Created
December 22, 2023 17:48
-
-
Save jlpouffier/dab39f143bc09ae5c103ef9d91da7aa0 to your computer and use it in GitHub Desktop.
standing_desk automation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Bureau - Standing Desk Autonome | |
description: "" | |
trigger: | |
- platform: time_pattern | |
minutes: "25" | |
- platform: time_pattern | |
minutes: "55" | |
condition: | |
- condition: state | |
entity_id: input_boolean.automation_meetings | |
state: "on" | |
- condition: state | |
entity_id: binary_sensor.jean_loics_laptop_camera_in_use | |
state: "off" | |
- condition: state | |
entity_id: binary_sensor.quest_in_use | |
state: "off" | |
action: | |
- choose: | |
- conditions: | |
- condition: state | |
entity_id: person.jenova70 | |
state: home | |
- condition: state | |
entity_id: binary_sensor.jean_loics_laptop_active | |
state: "on" | |
- condition: state | |
entity_id: device_tracker.jean_loics_laptop | |
state: home | |
- condition: state | |
entity_id: binary_sensor.capteur_presence_bureau_occupancy | |
state: "on" | |
- condition: state | |
entity_id: binary_sensor.workday_today | |
state: "on" | |
- condition: time | |
before: "18:00:00" | |
after: "08:00:00" | |
- condition: numeric_state | |
entity_id: sensor.next_meeting_in | |
above: 2100 | |
- condition: template | |
value_template: "{{ range(1, 4) | random == 1 }}" | |
sequence: | |
- service: button.press | |
target: | |
entity_id: | |
- button.standing_desk_move_desk_to_position_1 | |
data: {} | |
default: | |
- service: button.press | |
target: | |
entity_id: button.standing_desk_move_desk_to_position_2 | |
data: {} | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment