Hi !
This is my first post I’m new with all of this, so I’m trying to configure a wifi contact sensor (working with smartlife) so when I open the door it’ll light on some bulb…
I’ve been looking for code here and there I found something that should work but it don’t…
Hope you’ll be able to help me…
So here you go with the configuration.yaml:
binary_sensor:
- platform: ping
host: 80.215.104.197
count: 1
scan_interval: 1
name: ping_tuya_contact_door_sensor
And with automations.yaml:
- alias: "Hallway Door Contact Sensor"
trigger:
- entity_id: binary_sensor.ping_tuya_contact_door_sensor
platform: state
to: 'on'
condition:
condition: time
after: '19:00'
before: '08:00'
action:
- device_id: 0396c9488491444fad2b9aae4a2dd56f
domain: light
entity_id: light.hue_color_lamp_2
type: turn_on
I’ve found the device’s IP address in the Smartlife app so I guess it’s the good one though I don’t see much activity when running ping with terminal…
Thanks in advance for the help !
1 post - 1 participant