Created
June 12, 2019 16:01
-
-
Save jhalbrecht/2dbf4a858efb48a5831b8f813bc9ab7b to your computer and use it in GitHub Desktop.
Home assistant sonoff tasmota rf bridge pir configuratiion
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
# binary_sensors.yaml | |
- platform: template | |
sensors: | |
test_pir_00: | |
value_template: '{{ is_state("sensor.sonoff_rf_bridge", "EA0FDE") }}' | |
# delay_off: '00:05:30' | |
delay_off: '00:00:30' | |
device_class: motion | |
friendly_name: "PIR One" | |
# sensors.yaml | |
- platform: mqtt | |
state_topic: 'tele/homeamation/rf/sonoff/RESULT' | |
name: sonoff_rf_bridge | |
value_template: "{{ value_json.RfReceived.Data }}" | |
expire_after: 1 | |
# automations.yaml | |
- alias: Turn on shelly when there is movement | |
trigger: | |
platform: state | |
entity_id: binary_sensor.test_pir_00 | |
from: 'off' | |
to: 'on' | |
action: | |
service: homeassistant.turn_on | |
entity_id: switch.shelly01 | |
- alias: Turn off shelly001 1 minutes after last movement | |
trigger: | |
platform: state | |
entity_id: binary_sensor.test_pir_00 | |
from: 'on' | |
to: 'off' | |
for: | |
minutes: 1 | |
action: | |
service: homeassistant.turn_off | |
entity_id: switch.shelly01 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment