Hi need some help here,
I have been trying to use ‘Icon’ element to activate a scene in Picture Element Cards. But fail to do so. When I use ‘Service-button’, I am able to activate the scene successfully. I check syntax vigorously, but they are just both similar and calling the same service. Is my coding wrong or is it that Icon element cannot call a service like scene.turn_on?
Here is my 2 code under “Picture Element”
- ‘Service Button’ - work perfectly
- ‘Icon’ - fail to activate the same scene, without error message.
(The title is just a remark to remind myself)
- title: Activate TV On Scene
type: service-button
service: scene.turn_on
service_data:
entity_id: scene.iwtzll25a32zrfov
style:
left: 60%
top: 20%
- title: icon - call service to activate TV On Scene
type: icon
icon: 'mdi:bug'
style:
left: 45%
top: 35%
tap_action:
action: call-service
service: scene.turn_on
service_data:
entity_id: scene.iwtzll25a32zrfov
Sorry, please let me know if my post is not complete or confusing, let me know what is lacking and I will try to provide more information. I am using Pi4, HASSOS, Windows 10.
My objective is to use picture element, I want to place a AirConditioner icon on the picture, when I click on the icon, it will activate a scene to trigger Tuya IR Remote to turn on my TV. (I learned that HA can only trigger the IR remote through Scene, please correct me if I am wrong) . At this moment, since the IR/HA do not feedback the state of the TV, i would not expect that the icon would change color, I am just trying to learn how to ‘call’ the service right now. Thanks for your kind help, I have been struggling for few days searching in the forum for sample code but without success.