Im trying to get the toggle to work on some lights but instead of just turning them on and off it is bringing up the box where you can change brightness and color. What am I missing?
No problem⌠itâs easy to get caught up in our yaml and we miss the simple stuff I have done it a million times myself⌠another set of eyes always helps.
Did you read the docs at all? You donât have a correct format for tap_action. Word of advice, donât copy year old code from the forums. Consult the current documentation as yaml format may change over time.
Youâre right, and thanks for raising the issue ticket (could you link it here?)
I agree it is a bug, as I canât get the switch to toggle with the lovelace yaml above.
I have also tried with this code, which does work for the automation, but not for the lampâŚ
Expected a value of type {entity,name,icon} | entity-id for entities.0.tap_action but received {"action":"call-service","service":"switch.toggle","service-data":{"entity_id":"switch.bedlamp"}}.
When clicked, I get a popup saying
Failed to call service switch/toggle. must contain at least one of entity_id, area_id
I must be missing something obvious as I am undoubtedly not the first to try thisâŚ
Youâre over configuring the first glace item. At most you need tap_action: action: toggle. Even then, by default it should be toggleable with just the entity_id.
Edit, and the reason your service isnât working is because you have a - in your field name for service-data. Should be an underscore. You have it correct in your automation tap action, but not your bedlamp tap action.