unfoldedcircle / core-simulator

Remote-core simulator releases
30 stars 2 forks source link

Home Assistant demo server: fix demo light templates #10

Open zehnm opened 1 year ago

zehnm commented 1 year ago

After updating Home Assistant to the latest version the light template isn't fully working anymore:

Invalid config for [light.template]: [set_white_value] is an invalid option for [light.template].
Check: light.template->lights->sitting_room_chandellier->set_white_value.
(See /config/configuration.yaml, line 89). Please check the docs at https://www.home-assistant.io/integrations/template
zehnm commented 1 year ago

They removed white_value: https://developers.home-assistant.io/blog/2022/08/18/light_white_value_removed/ and it was announced a while ago in the light entity description 🙈

zehnm commented 1 year ago

I can't figure out how to write a Home Assistant light template which allows setting the white value with the new color_mode: white settings. It's probably obvious, but I'm not alone (and the official HA light template example still uses set_white_value):

Clarification: this is only about writing a demo light template for the included Home Assistant demo configuration in configuration.yaml. Setting the white value with the API is done with a new command parameter white: {"service": "light.turn_on", "data": {"white":50}} (according to: https://github.com/home-assistant/core/pull/51411)