Ok thanks. Yes I had not restarted appdaemon. Somewhere I read it was not necessary but that will be after it has been restarted the first time .
A comment on the structure, having a schedule per room means everything happens at the same time and also means that every actor has to be doing the same thing. If I have a thermostat and a switch in the room, they will have different values and need different schedules.
To control both, I’d need to create ‘virtual’ rooms.
Ah so I have it working sort of (added in an actor type).
I was expecting this to turn a switch off between the times and on otherwise. It is doing the opposite…
If you use the switch actor type, that should work.
Rooms are in fact a virtual concept to group actors that should behave identical together. It is also only one actor type allowed per Schedy instance… It’s all explained in the docs really.
Apart from the custom actor type that probably will be used rarely anyway, the documentation is complete.
I’ve merged Schedy over to the master branch, hence the usual installation instructions for the development version as written in the docs now count for Schedy as well.
My local time is 10:50 (UTC+1). Using this schedule, the switch is set to ‘off’ on initialisation. If I change the on time to 09:36, the switch initialises to ‘on’
Schedy seems to be working to the same time as the log timestamps (which are UTC). I’m not sure if these should be local or UTC which may point to my problem.
Then your system time zone is probably wrong. Please run
date
and post the output. If it’s a Debian-based system, you can configure the timezone with
sudo dpkg-reconfigure tzdata
Edit:
I’ve actually not set a timezone in appdaemon.yaml at all, just configured it in Home Assistant as Europe/Berlin in my case. And the system time zone is of course set correctly as well.
Edit 2:
I see you’re already discussing this in another thread and you’re using hassio. Schedy is definitely not the problem in your case, since AppDaemon gets a wrong time zone. Otherwise, its logs would be in local time as well. So you need to set the correct time zone in Home Assistant. Good luck.
Is there a way of setting attributes 1,2 & 3 of an entity to x, y & z at one period of time, then set those attributes to a, b & c at a different period of time using Schedy?
Possibly I am going about this the wrong way
I have also tried to use the thermostat actor on a generic thermostat. What attribute does the thermostat actor set with the value value?
Attributes aren’t just set, that wouldn’t trigger any action. The appropriate services are called instead. The thermostat actor’s documentation describes quite comprehensive which services are called with which attributes.
For your other issue, you need to use the custom actor type and implement the actions needed to set the desired attributes yourself. Read the docs. I plan to add an example custom actor sometime, but don’t have time right now.
2018-10-19 17:58:00.948872 INFO AppDaemon: Reading config
2018-10-19 17:58:00.993937 INFO AppDaemon: /config/appdaemon/apps/schedy-apps.yaml added or modified
2018-10-19 17:58:00.994444 INFO AppDaemon: App 'schedy' changed
2018-10-19 17:58:00.997921 INFO AppDaemon: Terminating schedy
2018-10-19 17:58:00.998499 INFO AppDaemon: Initializing app schedy using class SchedyApp from module hass_apps_loader
2018-10-19 17:58:01.000972 INFO schedy: *** Welcome to schedy 0.1.0, running on AppDaemon 3.0.1.
2018-10-19 17:58:01.003900 INFO schedy: ***
2018-10-19 17:58:01.005456 INFO schedy: *** This is an app from the hass-apps package.
2018-10-19 17:58:01.006961 INFO schedy: *** DOCS: https://hass-apps.readthedocs.io/en/stable/
2018-10-19 17:58:01.008443 INFO schedy: ***
2018-10-19 17:58:01.009877 INFO schedy: *** If you like this app and want to honor the effort put into it,
2018-10-19 17:58:01.012608 INFO schedy: *** please consider a donation.
2018-10-19 17:58:01.014431 INFO schedy: *** DONATE: https://hass-apps.readthedocs.io/en/stable/#donations
2018-10-19 17:58:01.016241 INFO schedy: *** Thank you very much and enjoy schedy!
2018-10-19 17:58:01.019704 INFO schedy: ***
2018-10-19 17:58:01.026323 INFO schedy: --- Actor type is: 'switch'
2018-10-19 17:58:01.043427 INFO schedy: --> [R:sunroom] [A:switch.ufh_heating] Received state of 'off'.
2018-10-19 17:58:01.146629 INFO schedy: <-- [R:sunroom] Value set to on. [scheduled]
2018-10-19 17:58:01.150152 INFO schedy: *** Initialization done.
2018-10-19 17:58:02.024401 INFO schedy: --> [R:sunroom] [A:switch.ufh_heating] Received state of 'on'.
the thermostat schedule is
schedy:
# Obligatory settings that tell appdaemon where to find the app.
# You shouldn't need to change these two.
module: hass_apps_loader
class: SchedyApp
actor_type: thermostat
debug: true
rooms:
#A schedule for the hot water tank
tank_shower:
schedule:
- value: 25
start: "05:30"
end: "19:00"
name: Fancy Rule
- value: 14
# - min_temp: 14
# max_temp: 16
replicate_changes: true
reschedule_delay: 1
actors:
climate.tank:
min_temp: 18
max_temp: 25
target_temp_service: 23
I have tried all sorts of different combinations. Rule should have a value of 25 right now.