Skip to content
Discussion options

You must be logged in to vote

I have discovered a way how to do what I want. But it does not work when I move rule action to a function. I guess there is some simple problem you can help me with.
So, if I keep funcitonality within a rule it works (all elements in the list gets hover class):

    - name: hover_element_1
      entities:
        - sensor.sonoffrfbridge_state
      hover_action:
        - service: floorplan.class_set
          service_data:
            elements:
              - shutters_circle
              - outlet_wifi_circle
              - sensor.sonoffrfbridge_state_circle
            class: |
              >
              var cls = '';
              if (element.matches(":hover")) {
                cl…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@done7k
Comment options

@OzGav
Comment options

@done7k
Comment options

Answer selected by done7k
@done7k
Comment options

@exetico
Comment options

@done7k
Comment options

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