With the new beautiful JSON API we have actual properties for both manual and auto zones. This means we can remove a bit more html parsing and add some clarity to downstream codebases (Home Assistant) by slightly tweaking and adding to our zone properties.
To start with I decided to leave watering_time intact as-is. I think I like how it gracefully hides the full details of how we compute that value behind the scenes. An implementing piece of logic shouldn't care if it's manual or auto minutes.
Secondly I added manual_watering as a boolean property. This is another nice addition to the "official" API that we can use to determine what mode the zone is currently operating under.
Lastly I renamed a few existing properties to better match the new addition so the library API is a bit more clear.
Coverage increased (+0.1%) to 96.561% when pulling a10efcb70eeadafd2b3908df999876ed5a7fd8b7 on feature/property_refactor into 1847fa913e5ba79645d51bf23637860d68c67dbf on master.
Coverage increased (+0.1%) to 96.561% when pulling 87880811a3cd71084bae41b8df288517c000de3f on feature/property_refactor into 1847fa913e5ba79645d51bf23637860d68c67dbf on master.
With the new beautiful JSON API we have actual properties for both manual and auto zones. This means we can remove a bit more html parsing and add some clarity to downstream codebases (Home Assistant) by slightly tweaking and adding to our zone properties.
To start with I decided to leave
watering_time
intact as-is. I think I like how it gracefully hides the full details of how we compute that value behind the scenes. An implementing piece of logic shouldn't care if it'smanual
orauto
minutes.Secondly I added
manual_watering
as a boolean property. This is another nice addition to the "official" API that we can use to determine what mode the zone is currently operating under.Lastly I renamed a few existing properties to better match the new addition so the library API is a bit more clear.