al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.42k stars 616 forks source link

Yeelight unable to get state of attribute Light.mode #1051

Open sasukebinbin opened 1 year ago

sasukebinbin commented 1 year ago

In template or Automation gui unable to get the attribute Light.mode. {{state_attr('light.yeelight', 'mode')}} or {{state_attr('light.yeelight', 'Light.mode')}} Both shows none.

I need to use it as a condition. Thanks

al-one commented 1 year ago
{{ state_attr('light.yeelight', 'light.mode') }}

See attributes in developer-tool.