Hi,
I’m still pretty new to Home Assistant, so apologies if I’m doing something stupid/missing something obvious.
I’m trying to set an automation so if I single press the button on an Aqara Zigbee button it will either turn on my bathroom lights if they are off (by a scene) or turn them off if they are on. The buttons connect to Home Assistant via the Tuya integration, and I’m using zigbee2mqtt.
I’ve got this working fine for my landing lights but for some reason the bathroom lights won’t turn off unless I’ve left them on for a few minutes.
The bulbs are wifi bulbs connected to Smartlife and this is the same on the landing and the bathroom.
I can’t use toggle as the lgihts don’t necessarily come on with the brightness and colour I want, but this isn’t a problem in the landing.
Below are the yaml configurations for the landing lights off and on and also the bathroom.
alias: Landing Light On
description: Landing Smart Button
trigger:
- device_id: 74f2a41e50c3be633e18bca182b1ea1b
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
condition:
- condition: device
type: is_off
device_id: 53781603e6d8eaa1a727bef6b4907a79
entity_id: light.20430382bcddc268a9b7
domain: light
action:
- scene: scene.landing_standard
mode: single
alias: Landing Light Off
description: LandingSmart Button
trigger:
- device_id: 74f2a41e50c3be633e18bca182b1ea1b
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
condition:
- condition: device
type: is_on
device_id: 53781603e6d8eaa1a727bef6b4907a79
entity_id: light.20430382bcddc268a9b7
domain: light
action:
- type: turn_off
device_id: 53781603e6d8eaa1a727bef6b4907a79
entity_id: light.20430382bcddc268a9b7
domain: light
mode: single
alias: Bathroom On
description: ''
trigger:
- device_id: b2314449a5f6029927d86edbe3f9e6da
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
condition:
- condition: device
type: is_off
device_id: c05356f9ae75d150bd2ee817fb331437
entity_id: light.73027080c82b9603fb6f
domain: light
action:
- scene: scene.xuy7wydyx0aduj8o
mode: single
alias: Bathroom Off
description: ''
trigger:
- device_id: b2314449a5f6029927d86edbe3f9e6da
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
condition:
- condition: device
type: is_on
device_id: c05356f9ae75d150bd2ee817fb331437
entity_id: light.73027080c82b9603fb6f
domain: light
action:
- type: turn_off
device_id: c05356f9ae75d150bd2ee817fb331437
entity_id: light.73027080c82b9603fb6f
domain: light
- type: turn_off
device_id: 5fae9dadc2f5acb1b0de5ad344d88431
entity_id: light.73027080c82b9603f1de
domain: light
mode: single
I did try just trying to control one bulb in the bathroom in case that was the issue but it didn’t make an difference.
I’m completely stumped by this and any help would be much appreciated.
Thanks in advance, and sorry if I’ve posted this incorrectly in any way