-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set_schedule not working for old automation / some time entries changed to needing quotes #325
Comments
@toddstar - thanks for logging this. We moved from ruamel.yaml to pyyaml with v3.2.0 change to the fully async api - aioWiserHeatAPI, to be more inline with HA. I did not notice this change in the time string requirements (seems this is yaml 1.1 compliant and ruamel was yaml1.2 compliant) but I think also, it should not fail silently but provide some notification that it has not been able to set the schedule due to errors in the yaml file. Will look to add something to better identify and error message this. |
Interesting. This issue seems to give me http 400 errors like this:
|
It will as unquoted times higher than 10am will send invalid times to the hub when setting a schedule. Error 400 is what the hub returns in this situation. Next integration update will have better error handling to alert to this issue. |
Improved error checking and notifying now in v3.2.3beta. Are you able to check it? Thx |
getting
using the wiser.get_schedule command to generate a file and then using that same file in the wiser.set_schedule command |
Sorry, reorganised some code and made a typo. Just released v3.2.3beta2 that should now work. |
yeah working now and getting an error warning on HA automations page and node red outputs the error message too |
More an fyi, as very easy to change on the users end, but it seems some time entries now need to be enclosed in quotes for the set_schedule file to correctly update the schedule and without updating your files to enclose the times in quote marks (see File Fix at the bottom) the old format fails silently. Couldn't see anything in release notes about this change, so mainly creating this just so others can find the information when searching for "set_schedule" issues to save themselves some debug/testing time.
e.g.
my spare room has the following code in my current saved files (I use node red to switch between 3 difference preset files for all my schedules based on the external temperature for a summer, winter & an inbetween sate)
as its now getting cold enough that it should be switching between inbetween & winter I noticed that the schedule didn't seem to be changing and also couldn't see any errors being logged. So deleted the schedule from wiser, created a fresh dummy schedule in the wiser app and pulled it via get_schedule which output
which now has quotes around 22:30 time but not the other times. (didn't test but guess its probably anything after 10:00???). Not sure when this changed but definitely post 'set_heating_schedule' changing to just 'set_schedule' as my old files still worked when testing the change to the service used
File Fix
All the time variables work enclosed so for a quick fix you can do a quick Ctrl+R (find & replace) to search for
Time:
and replace all toTime: '
and same with:00
to:00'
/:15
to:15'
/:30
to:30'
/ etc.so that it looks something like below
The text was updated successfully, but these errors were encountered: