hhaim / hass

home assistant and appdaemon scripts and configuration file
41 stars 16 forks source link

Accumulator behavior #10

Open kajmaj opened 5 years ago

kajmaj commented 5 years ago

Hello, I am trying tu use accumulator to count "ON time" of the heater. It works, but in the weird way: If I restart hassio, accumulator starts accumulate, does not matter the state of the switch (relay) in the time of hassio restart. It simply counts in both cases ie. relay is ON or OFF after hassio restart. If it is OFF I have to manually ON and back to OFF again to stop counting.

Switch configuration:

switch:
  - platform: mqtt
    name: "heater_b"
    command_topic: "cmnd/bathroom/power"
    state_topic: "stat/bathroom/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"

Accumulator config:

  - platform: accumulator     
    name: bathroom_clock
    entity_id: switch.heater_b
    state_on: 'on'
    state_off: 'off'

Is there any way around hot to make it working properly?

hhaim commented 5 years ago

@kajmaj there is probably a bug, I will look into it. Anyhow, I've started to use InfluxDB + Grafana which is much more flexible to create reports of accumulating see the Wiki how I've configured it

kajmaj commented 5 years ago

This is my next task, but still postponed, furthermore I use MariaDB. BTW could you provide link to wiki? :) Thanks