Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- substitutions:
- devicename: moestest
- oldname: $devicename
- <<: !include devices/esp8266.yaml
- <<: !include modules/wifi.yaml
- <<: !include modules/common.yaml
- uart:
- rx_pin: GPIO3
- tx_pin: GPIO1
- baud_rate: 9600
- tuya:
- switch:
- - platform: "tuya"
- id: relay1
- name: "Test 1"
- switch_datapoint: 1
- - platform: "tuya"
- id: relay2
- name: "Test 2"
- switch_datapoint: 2
- binary_sensor:
- - platform: tuya
- id: persist1
- sensor_datapoint: 1
- on_state:
- then:
- - logger.log: "State changed for relay1"
- - platform: tuya
- id: persist2
- sensor_datapoint: 2
- on_state:
- then:
- - logger.log: "State changed for relay2"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement