nielsfaber / scheduler-card

HA Lovelace card for control of scheduler entities
GNU General Public License v3.0
898 stars 113 forks source link

Ability to schedule service calls not linked to an entity #514

Closed mithomas closed 2 years ago

mithomas commented 2 years ago

Checklist

Proposal

As of now, the scheduler card allows for setting up schedules/schemes to set states or call services based on entities (i.e. light.turn_on as given in the documentation).

I'd like to be able to call a generic service which is not linked to an entity (specifically I want to use it to simply schedule reboots of my Velux gateway via the service velux.reboot_gateway but this could be used for similar ones like fritz.reboot or even hassio.host_reboot as well).

Additional info

My current alternative is to do this via an automation:

- id: infra_reboot_klf
  alias: KLF reboot
  description: reboots the KLF200 in order to avoid TLS handshake issue
  trigger:
    - platform: homeassistant
      event: shutdown
    - platform: time
      at: "02:00:00"
  action:
    - service: velux.reboot_gateway
nielsfaber commented 2 years ago

I think the use-cases for this are very limited while it creates a huge complexity in the card (the configuration flow is now 'pick entity' and then 'pick action'). I don't see it worth it to adapt scheduler to it.

You can schedule a script or create a template switch to achieve this, I propose you use that.

mithomas commented 2 years ago

@nielsfaber: Thanks for pointers, this is really helpful. Do you think this might be worth putting into the Tips & Tricks section?

nielsfaber commented 2 years ago

In my opinion this is just HA basics, nothing specific to scheduler. If you would like a flip switch in Lovelace for restarting manually you would need the same approach.