Skip to content
Discussion options

You must be logged in to vote

had a stupid typo (attributes instead of attribute)

entities:
  - entity: fan.kamin_fan_office_roof
    attribute: percentage
    yaxis: y2
    name: per
    line:
      color: gray
    filters:
      - fn: |-
          ({xs, ys, vars, meta, states, statistics, hass}) => { 
          vars.myVar=states;
            return {
               ys: states.map(s=>(s.state=="on"?1:0)*s.attributes.percentage),
               xs: xs
             };}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jandechent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant