Skip to content

Schedules

Mark Parker edited this page May 16, 2023 · 2 revisions

This integration has a number of ways to manage schedules for your Wiser Hub.

  • Using services to get, set, copy and assign schedules in scripts, automations or the developer tools
  • Using the Schedule Card to manage schedules in a GUI environment.

This page describes the services methods to managing schedules. See the Custom Cards page to learn more about the Schedule Card

Getting a Schedule

Use the service get_schedule

This will require you to provide the entity ID of the wiser device and a file to copy this schedule to. Leaving the filename blank will place the file in your config directory in the format climate.wiser_roomname_schedule.yaml It is recommended to create a directory in your config directory to store these.
See below for information on selecting the correct entity.

Note : If you are running HA within a docker container then the directory will be absolute to the container, if you have mapped the config directory to a local directory then all is good but the directory name given to the service must be a docker container address.

E.g. if you specify the filename as /config/schedule.yaml then get_schedule writes the file into the directory within the container. Providing you have mapped the config directory (using the -v or volumes: in docker-compose) then you can read this from a host directory (e.g. /home/haconfig.

Saving Multiple Schedules to Files The service supports the ability to save multiple schedules at once. Select multiple entities and do not supply a filename and it will output the list of schedules based on the predefined name structure.

service: wiser.get_schedule
data:
  entity_id: 
    - climate.wiser_dining_room
    - climate.wiser_kitchen
    - climate.wiser_lounge

Setting a Schedule

Use the service set_schedule

This will require you to provide the entity ID of the wiser device and a file containing the schedule.
See below for information on selecting the correct entity.

Set multiple entities from one file The service supports setting multiple schedules from one file. List the entities in the service call you wish to set the schedule for.

service: wiser.set_schedule
data:
  entity_id: 
    - climate.wiser_dining_room
    - climate.wiser_kitchen
    - climate.wiser_lounge
  filename: config/schedules/summer_schedule.yaml

A good place to start is to get a schedule from a device and see the file structure. You can add times and temps within each day as you see fit. As file created using the get_schedule service looks like below:

Name: Dining Room
Description: Schedule for Dining Room
Type: Heating
Monday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Tuesday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Wednesday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Thursday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Friday:
  - Time: 07:30
    Temp: 21
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Saturday:
  - Time: 07:00
    Temp: 19
  - Time: 10:00
    Temp: 17
  - Time: 16:00
    Temp: 20
  - Time: 23:00
    Temp: 15
Sunday:
  - Time: 08:30
    Temp: 21

If you are creating your own file (or editing one you have copied from a wiser device), you can use the 3 special day names of 'All', 'Weekdays' and 'Weekends' instead of listing individual days.

For lights and shutters, you can also use the special times of Sunrise and Sunset.

e.g.

Name: Test Room
Description: Schedule for Test Room
Type: Heating
Weekdays:
  - Time: 07:30
    Temp: 21.5
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Weekends:
  - Time: 07:00
    Temp: 19
  - Time: 10:00
    Temp: 17
  - Time: 16:00
    Temp: 20.5
  - Time: 23:00
    Temp: 15

You can also use a mixture of these special day names and normal days to override a specific day (providing the specific days names are below these special ones!).

Name: Test Room
Description: Schedule for Test Room
Type: Heating
Weekdays:
  - Time: 07:30
    Temp: 21.5
  - Time: 08:30
    Temp: 15
  - Time: 16:30
    Temp: 20
  - Time: 22:30
    Temp: 15
Weekends:
  - Time: 07:00
    Temp: 19
  - Time: 10:00
    Temp: 17
  - Time: 16:00
    Temp: 20.5
  - Time: 23:00
    Temp: 15
Tuesday:
  - Time: 08:00
    Temp: 21.5
  - Time: 20:00
    Temp: 18.0

For hotwater and smartplugs (to make reading the schedule file easier) you can use time and state keys like below. Note for both hot water and smartplugs, the Type parameter must be set to OnOff in your file.

Name: Hot Water
Description: Schedule for Hot Water
Type: OnOff
Weekdays:
  - Time: 06:30
    State: On
  - Time: 10:30
    State: Off
  - Time: 16:30
    State: On
  - Time: 22:30
    State: Off
Weekends:
  - Time: 06:30
    State: On
  - Time: 10:30
    State: Off
  - Time: 16:30
    State: On
  - Time: 22:30
    State: Off
Tuesday:
  - Time: 08:00
    State: On
  - Time: 20:00
    State: Off

Copying a Schedule

Use the service copy_schedule

This will require you to provide an entity ID of the device to copy from and the entity ID of the device to copy to and will copy the schedule between them.

Copying Same Schedule to Multiple Entities Providing the schedule type is the same, you can supply multiple to_entities and the service will copy to them all.

Assigning a Schedule

Use the service assign_schedule

You can either provide an entity ID to reference the schedule attached to that entity or provide and schedule ID

What Entity Should I Choose?

  • Room heating schedules - use the climate entity of the room. eg climate.lounge
  • Hot water on/off schedule - use the Hot Water Mode select entity eg select.hotwater_mode
  • Smartplug on/off schedules - use the Smartplug Mode select entity of the smart plug eg select.smartplug1_mode
  • Lights - use the Light Mode select entity for the light eg. select.lounge_light_mode
  • Shutters - use the Shutter Mode select entity for the shutter eg. select.lounge_blinds_mode