Skip to content

Binary Sensor (on/off) count multiply and per day. #205

Answered by dbuezas
thecem asked this question in Q&A
Discussion options

You must be logged in to vote

oh, to count per day, you'll need #181, which I still need to implement.
As a hack, you could do the following (in the new v3.0.0 release)

type: custom:plotly-graph
entities:
  - entity: binary_sensor.lumi_lumi_magnet_acn001_iaszone
     unit_of_measurement: 
     filters:
      - map_y: y === "on" ? 1 : 0
      - integrate: 1d # will accumulate in units per day
      - resample: 1d #will keep 1 measurement per day only
      - delta # will subtract each two consecutive values
      - multiply: 0.1
      - store_var: gas
  - entity: ""
     filters:
      - load_var: gas
      - trendline

Replies: 3 comments 11 replies

Comment options

You must be logged in to vote
3 replies
@dbuezas
Comment options

@dbuezas
Comment options

@thecem
Comment options

Answer selected by dbuezas
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@thecem
Comment options

@dbuezas
Comment options

@thecem
Comment options

@dbuezas
Comment options

@thecem
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
2 participants