#Dashboard with Toggle switches for time tracking

1 messages · Page 1 of 1 (latest)

pale igloo
#

Was floating the idea of creating a dashboard with some toggle switches on it that can keep track of time that the switch is turned on and send me an email when it's turned off. My initial thought is just a toggle switch with a history_stats entity monitoring the state of the toggle switch entity. Curious what your thoughts on this kind of setup would be

fluid jay
#

Might not need history stats. Here's a simple example automation that will tell you how long a input_boolean was turned on for when you turn it off.

description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.boolean1
    from: "on"
    to: "off"
condition: []
action:
  - action: persistent_notification.create
    metadata: {}
    data:
      message: "{{ trigger.to_state.last_changed - trigger.from_state.last_changed }}"
      title: Toggle Time
mode: single

You can modify to send yourself an email.

pale igloo
#

Man this is a lot to jump into lol

pale igloo
#

looks like I can't extract the friendly name of the trigger, is there a different way to do it other than adding trigger.entity_id.friendly_name to the message string?

fluid jay
pale igloo
pale igloo
#

Now I have noticed just during testing that automations don't always fire if I toggle off multiple switches in a short time period. Is that just a limitation of automations or is that a configuration issue?

pale igloo
#

man, im solving all my problems, it was set for single mode. changed it to parallels

tidal wagon
pale igloo
tidal wagon
pale igloo
#

No, it's a dashboard to solve a ridiculously stupid problem for a department of employees

#

It's gonna be a bunch of entities with 1 button per entity