You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm trying to do create rule for detached button with 1 gang switch.
relay 1 (fake relay) assigned to device group with another tasmota bulb and there's relay 2 (actual relay).
Single press to toggle relay 1 (wifi is connected) or toggle relay 2 (wifi disconnected)
Triple press to toggle relay 2 (power cycle tasmota/openbeken bulb IF it's disconnected from wifi)
on Wifi#Disconnected do var2 0
on Wifi#Connected do var2 1
on var2#state==0 do power2 toggle endon
on var2#state==1 do power1 toggle endon
on button1#state=10 do var2 endon
on button1#state=12 do power2 toggle endon
What I can't quite figure out is adding another rule for this action.
Single press to toggle relay 2 only if wifi is connected & relay 2 is off
(example in esphome)
on_state:
then:
- if:
condition:
and:
- wifi.connected:
- api.connected:
- switch.is_on: shelly_relay
# toggle smart light if wifi and api are connected and relay is on
then:
- homeassistant.service:
service: light.toggle
data:
entity_id: light.kitchen
# else, toggle relay
else:
- switch.toggle: shelly_relay
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, i'm trying to do create rule for detached button with 1 gang switch.
relay 1 (fake relay) assigned to device group with another tasmota bulb and there's relay 2 (actual relay).
What I can't quite figure out is adding another rule for this action.
Single press to toggle relay 2 only if wifi is connected & relay 2 is off
(example in esphome)
Any thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions