Skip to content

Instantly share code, notes, and snippets.

@timaseth
Created February 9, 2023 07:03
Show Gist options
  • Save timaseth/8a3fb74c6011ad07fa35a4b2673d4b80 to your computer and use it in GitHub Desktop.
Save timaseth/8a3fb74c6011ad07fa35a4b2673d4b80 to your computer and use it in GitHub Desktop.
alias: 30 second light
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.upstairs_movement_illuminance_sensor_occupancy
- platform: state
entity_id:
- binary_sensor.downstairs_movement_illuminance_sensor_occupancy
condition:
- condition: template
value_template: "{{ trigger.to_state.state == "on" }}"
action:
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- service: zha.set_zigbee_cluster_attribute
data:
ieee: "{{ device_attr(trigger.entity_id, "identifiers") | first | last }}"
endpoint_id: 1
cluster_id: 1280
attribute: 2
value: "0"
mode: parallel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment