Skip to content

Accessing and changing different elements style properties with different values #60

Answered by pkozul
Alfiegerner asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Alfiegerner

Not sure if it's applicable in your scenario, but I wonder if the Light example contains the sort of code you require.

https://experiencelovelace.github.io/ha-floorplan/docs/example-light/

As you can see in that example, the service_data is evaluated dynamically, and the returns value contains the target DOM element(s) to be used for the call to floorplan.style_set.

BTW, as you noticed, direct access to the DOM is not supported (due to sandboxing), so the best you can do is tell floorplan which DOM element you want to update via floorplan rules.

Let us know if that helps.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Alfiegerner
Comment options

@exetico
Comment options

@Alfiegerner
Comment options

@Alfiegerner
Comment options

@pkozul
Comment options

Answer selected by pkozul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants