rianadon / timer-bar-card

A progress bar display for Home Assistant timers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configuration for RainMachine Integration

shbatm opened this issue · comments

RainMachine

The RainMachine integration holds the completion time in a separate entity than the switch for the zone. It's state appears as the finish datetime in UTC.

RainMachine controllers "cycle" between zones to allow for soak time, so the switches state only indicates that it is active in a running program, but not necessarily currently watering. Using state_attribute: status gets the actual status of the zone. Here I use extend_paper_buttons_row to still add a toggle button for the zone on the end of the row.

Thanks @rianadon for adding the state_attribute option and paper-buttons-row support!

Your card configuration

entity: switch.sprinklers_back_yard
type: custom:timer-bar-card
end_time:
  entity: sensor.sprinklers_back_yard_run_completion_time
  state: true
state_attribute: status
active_state:
  - Running
pause_state:
  - Queued
name: Back Yard
extend_paper_buttons_row:
  position: right
  buttons:
    - entity: switch.sprinklers_back_yard
      name: false
      icon: mdi:power
...

Caveats
See above.

Thanks @shbatm!