Closed migueldc73 closed 1 year ago
thats odd.. I just tested this:
tap_action:
action: call-service
service: >
[[[ return entity.state == 'open'
? 'cover.close_cover' : 'cover.open_cover'; ]]]
data:
entity_id: entity
confirmation:
text: Alle rolluiken togglen?
and it works just fine.
could you test it with the entity
and see what happens?
But in the Web browser, I get the error message : \"Failed to call service cover/open_cover. must contain at least one of entity_id, device_id, area_id
That's a browser caching issue. Your browser is still using the old version while the companion app is using the new one.
It's actually the other way around. My web browser cache was clean, but not the one from my companion app. Now it also does not work on the companion app.
Even this simple custom button which turns a group of lights off when doing a hold action, does not work anymore, while it did yesterday:
type: custom:button-card
theme: Mushroom
name: Gelijkvloers
show_icon: false
show_state: false
styles:
card:
- height: 50px
grid:
- position: relative
custom_fields:
notification:
- background-color: |
[[[
if (states['sensor.light_group_gelijkvloers'].state == 0)
return "var(--background-color)";
return "orange";
]]]
- border-radius: 50%
- position: absolute
- left: 85%
- top: '-50%'
- height: 30px
- width: 30px
- font-size: 18px
- line-height: 30px
custom_fields:
notification: |
[[[
if (states['sensor.light_group_gelijkvloers'].state > 0)
return states['sensor.light_group_gelijkvloers'].state
]]]
tap_action:
action: navigate
navigation_path: /overview-with-icons-for-phone/gelijkvloers
hold_action:
action: call-service
service: light.turn_off
target:
entity_id: light.group_gelijkvloers
I have the impression something is broken in my HASS config. Or my custom button. This is really weird !
So, I went back to a full backup of the previous day, re-implemented my custom button cards and it now all works as predicted.
My guess is that I installed or removed an important library while fiddling and that somehow broke the custom button card behaviours (other cards still worked fine)
Can't stress the importance of regular backups !!
I have implemented embedded buttons through custom fields:
This works perfectly well in the Companion App. When I click on Open, Stop or Close, it calls the appropriate service
But in the Web browser, I get the error message : "Failed to call service cover/open_cover. must contain at least one of entity_id, device_id, area_id