-
|
I was trying to set a rule that, based on an HA weather entity, I could set multiple elements in my SVG floorplan, in this case, a text_set for the temperature and image_set an icon for the weather condition. I did a lot of trial and error and could not get it to work. Eventually I found a successful workaround by splitting it into two rules, with the image_set one moving the element field up to the top level, out of service_data: Is this a bug? The documentation lists element and elements as valid objects for all service_data sections. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Hi, Could you please let me know where you find the reference, pointing you to add - entity: weather.demo_weather_north
state_action:
- action: call-service
service: floorplan.text_set
service_data:
element: sensor.weather_temperature ⬅️ I'm asking about this
shift_y_axis: 2em
text: ${ entity.attributes.temperature }${ entity.attributes.temperature_unit }
- action: call-service
service: floorplan.image_set
service_data:
element: sensor.weather_condition
image: /local/icons/weather/${ entity.state }.svgThe element reference neds to be at the top of the rule, in other words, at the same level, as you define If you've found a broken example, I'd be more than happy to correct that, or look into any misleading information. Maybe I even remember wrongly. If it was meant to work this way, and it's now not working anymore, I'll take a look at that. |
Beta Was this translation helpful? Give feedback.

I've introduced a solution for this in: #519 (comment)
Please provide feedback in the mentioned issue, if you find any bugs. You cannot use
elementsfor this feature (only a singleelementis supported)