forked from bmenchaca/icomfort3-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added change zone schedule ID support.
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/python | ||
|
||
import secrets | ||
import time | ||
from session import IComfort3Session | ||
from lcc_zone import IComfort3Zone | ||
|
||
s = IComfort3Session() | ||
s.login(secrets.icomfort_username, secrets.icomfort_password) | ||
homes = s.fetch_home_zones() | ||
|
||
for home in homes: | ||
for (lcc, zone) in homes[home]: | ||
z = IComfort3Zone(home, lcc, zone) | ||
s.set_context(home, lcc, zone) | ||
print ("Home %s, lcc %s, zone %s" % (home, lcc, zone)) | ||
update = z.fetch_update(s) | ||
print("Before Change Zone Schedule: %s" % update['ScheduleId']) | ||
change = z.change_zone_schedule_id(s, 1) | ||
after = z.fetch_update(s) | ||
print("After Change Zone Schedule: %s" % update['ScheduleId']) | ||
|
||
for home in homes: | ||
for (lcc, zone) in homes[home]: | ||
z = IComfort3Zone(home, lcc, zone) | ||
s.set_context(home, lcc, zone) | ||
print ("Home %s, lcc %s, zone %s" % (home, lcc, zone)) | ||
update = z.fetch_update(s) | ||
print("Before Change Zone Schedule: %s" % update['ScheduleId']) | ||
change = z.change_zone_schedule_id(s, 3) | ||
after = z.fetch_update(s) | ||
print("After Change Zone Schedule: %s" % update['ScheduleId']) | ||
|
||
s.logout() |