Hi, I used Scenegen to create a scene (I only have one at the moment) and then “cleaned up” what what not needed. But the scene triggers actions that are not on the list!
name: watching_tv
entities:
switch.sonoff_10005d02c9:
state: off
switch.21072088c44f339c3e78:
state: on
switch.lamp:
state: off
light.cosy6:
state: on
brightness: 76
color_temp: 370
light.kitchen_4:
state: off
light.closet_4:
state: off
light.kelder_4:
state: off
light.sleeping_room_1:
state: off
light.toilet_1:
state: off
light.bathroom_1:
state: off
light.closet_3:
state: off
light.cosy8:
state: on
brightness: 76
color_temp: 370
light.cosy1:
state: off
light.cosy9:
state: on
brightness: 76
light.kelder_3:
state: off
light.sleeping_room_4:
state: off
light.office_3:
state: off
light.kelder_2:
state: off
light.hobby_room_2:
state: off
light.toilet_3:
state: off
light.dining_3:
state: on
brightness: 51
light.office_panel:
state: off
light.was_2:
state: off
light.closet_1:
state: off
light.cosy4:
state: off
light.office_2:
state: off
light.cosy13:
state: unavailable
light.cosy11:
state: off
light.sleeping_room_3:
state: off
light.office_1:
state: off
light.hobby_room:
state: off
light.logeerkamer_2:
state: off
light.kitchen_5:
state: off
light.living_room_3:
state: on
brightness: 254
light.cosy5:
state: on
brightness: 76
color_temp: 370
light.was_3:
state: off
light.sleeping_room_5_1:
state: off
light.living_room_2:
state: on
brightness: 254
light.hall_2:
state: off
light.was_1:
state: off
light.logeerkamer_1:
state: off
light.kitchen_2:
state: off
light.logeerkamer_3:
state: off
light.sleeping_room_2:
state: off
light.toilet_2:
state: off
light.hall_3:
state: off
light.dining_1:
state: on
brightness: 51
light.cosy10:
state: off
light.cosy2:
state: unavailable
light.living_room_1:
state: on
brightness: 254
light.kelder_1:
state: off
light.hall_1:
state: off
light.dining_5:
state: on
brightness: 51
light.closet_2:
state: off
light.cosy7:
state: on
brightness: 76
color_temp: 370
light.kitchen_3:
state: off
This motorized curtain opens/closes when I run this scene: [cover.16236476a4cf12b18892] but it’s not on the list!!
Hi, thanks. If I do this automation with a simple “entity card” - it works. Not rolling shutter trigged. The same with a toggle button (I don’t want to have a 2 step click to trigger it) has the problem. Here’s my toggle button (broken):
My log tells me the following - I searched but can’t understand what I need to do:
Not passing an entity ID to a service to target all entities is deprecated. Update your call to scene.turn_on to be instead: entity_id: all
You say ‘cleaned up’ from the look of the code, it is very clean.
But the fact that you said it leads me to think it was generated by one of the editors ?
So is that what you did with the scripts and automations ?
I’m just trying to see if ALL your automations are in one file ?
If so do a text search in that file for this cover, see what you find.
The Lovelace card editor removes service data when you save the card and go to edit it again. Current bug I guess. You’ll need to update the entity card with the service data again under tap_action: https://www.home-assistant.io/lovelace/entity-button/#tap_action
That error is telling you that you called the scene.turn_on service without specifying an entity ID. When you do that it will turn on all scenes. Might be as a result of the card editor removing the service data.
Hi, I have a very “lean” installation - I have no automation yet nor have I scripts running. When I said “cleaned” - I meant that running “SceneGen” built a “scene” with ALL my devices - so I “cleaned” up or removed the ones that were irrelevant for that scene. Thanks
OK - sorry for all those edits! Actually, the scene doesn’t even work - on the last test below - I changed to very simple, single, entity (light). It doesn’t turns on as it should - but the rolling shutters do… Which is that defaulting thing happening from the comments above. I’m wondering then why is the scene not working.
Weird and weirded… I reduced my scene to only this:
name: watching_tv
entities:
light.cosy6:
state: on
brightness: 76
color_temp: 370
Which is a single entity that is active and works. And still the other one (the rolling shutters) turns down.
I also double checked that it loads. It does under tools/states
Entity
scene.watching_tv
State
scening
State attributes (JSON, optional)
{
"entity_id": [
"light.cosy6"
],
"friendly_name": "watching_tv"
}
Ok… and as a very last test - I changed entity to the simplest:
name: watching_tv
entities:
light.office_1:
state: on
I found the solution. The Lovelace UI card generator doesn’t produce the proper code in the card for a toggle button to a “scene.turn_on”. It needs an “entity_id”.
# - Working Solution
- entity: scene.watching_tv
tap_action:
action: call-service
service: scene.turn_on
service_data:
entity_id: scene.watching_tv
# - WRONG CODE produce by the UI designer of Lovelace for a "Toggle"
# - tap_action:
# action: call-service
# service: scene.turn_on