home-assistant.io icon indicating copy to clipboard operation
home-assistant.io copied to clipboard

No instruction on how to implement

Open Alekisan opened this issue 3 years ago • 1 comments

Feedback

You have information about what the helper does but no examples on how to use it.

URL

https://www.home-assistant.io/integrations/schedule/

Version

2022.9.2

Additional information

No response

Alekisan avatar Sep 13 '22 02:09 Alekisan

Hey there @home-assistant/core, mind taking a look at this feedback as it has been labeled with an integration (schedule) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Yeah, I am struggling with this too. Do I use automations, scenes, scripts? Where can I select the schedule I just created for the device I want to control? It's a bit of a mystery at the moment. Thanks!

clydefrog76 avatar Sep 28 '22 17:09 clydefrog76

Agreed. I have switch that I would like to turn on at the begin of the scheduled time, and turn off at the end. It is not obvious how to use the entity next_event in an Automation, and even when using the UI to make a new automation, there are no options for Schedules in the Trigger section, where as a user I would expect this to be.

guitarmanusa avatar Sep 29 '22 01:09 guitarmanusa

Found the following in the user forums, apparently you're supposed to use a 'state' trigger, even though the doc has no mention of a state with values of 'on' and 'off' listed.

Question: How to Use the Scheduler / Helper Function in the 2022.9 Release

I should note, I haven't gotten the following to work yet:

- id: control-hot-water-heater-with-schedule
  trigger:
    - platform: state
      entity_id: schedule.hot_water_schedule
  condition: "{{ trigger.to_state.state in ['on', 'off'] }}"
  action:
    - service: 'switch.turn_{{ trigger.to_state.state }}'
      target:
        entity_id: switch.hot_water_heater_switch

guitarmanusa avatar Sep 29 '22 04:09 guitarmanusa

Found the following in the user forums, apparently you're supposed to use a 'state' trigger, even though the doc has no mention of a state with values of 'on' and 'off' listed.

Question: How to Use the Scheduler / Helper Function in the 2022.9 Release

I should note, I haven't gotten the following to work yet:

- id: control-hot-water-heater-with-schedule
  trigger:
    - platform: state
      entity_id: schedule.hot_water_schedule
  condition: "{{ trigger.to_state.state in ['on', 'off'] }}"
  action:
    - service: 'switch.turn_{{ trigger.to_state.state }}'
      target:
        entity_id: switch.hot_water_heater_switch

I made it work using the UI. I created 2 separate automations, one for the on trigger and one for the off trigger. I didn't want to use toggle but that's fine for me.

Create new empty automation -> trigger = state -> entity = your schedule -> attribute from = off / attribute to = on -> action = device -> pick your device and your action -> save automation

clydefrog76 avatar Sep 29 '22 09:09 clydefrog76

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved. If this issue is still relevant, please let us know by leaving a comment 👍 This issue has now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 28 '22 10:11 github-actions[bot]