dannytsang / homeassistant-config

🏡 My Home Assistant Configs.
https://dannytsang.com
32 stars 0 forks source link

Create a ⏱️Stopwatch For 🍳 Oven #97

Closed dannytsang closed 1 year ago

dannytsang commented 1 year ago

When the oven is in use, create 2 clocks for how long the oven has been on for.

Most items need the oven to be pre-heated before putting the item in so it would not make sense to have 2 separate clocks.

It would be hard to automate a timer because Home Assistant would need to know when the item was put in as well as how long for. It would be quicker to set a timer on the oven or some other device at this stage.

dannytsang commented 1 year ago

Turns out, a stopwatch is not a feature in Home Assistant ☹️ workaround: https://community.home-assistant.io/t/stopwatch-with-start-stop-resume-lap-and-reset/443994

dannytsang commented 1 year ago

Added helper and automations for preheat detection: e53897c70b1a34403ba9beb7193ca4f29b3ad849

Using chip card from mushroom integration, a chip appears when the oven is on. The colour and time last changed will change depending if it's preheating or preheated. This will mean the time shown will reset when the preheat is done.

type: custom:mushroom-chips-card
chips:
  - type: conditional
    conditions:
      - entity: binary_sensor.oven_powered_on
        state: 'on'
    chip:
      type: template
      entity: binary_sensor.oven_powered_on
      icon: mdi:toaster-oven
      icon_color: >-
        {{ iif(states('input_boolean.oven_preheated') == 'on', 'green',
        'orange') }}
      content: >-
        Oven ({{ iif(states('input_boolean.oven_preheated') == 'on',
        relative_time(states.input_boolean.oven_preheated.last_changed),
        relative_time(states.binary_sensor.oven_powered_on.last_changed)) }})
      tap_action:
        action: more-info

Example look and feel: image image