Getting unknown for next watering sensor
mash2k3 opened this issue · 4 comments
Describe the bug
I get unknown state for the sensors next watering and delay finished
Expected behaviour
get a timestamp for both sensors
BHyve devices
HT25
Wifi hub gen 1
I downloaded bhyve_next_watering.py and moved it to \config\python_scripts
Added python_script: to config.yaml
called service
service: python_script.bhyve_next_watering data: entity_id: switch.frontyard_zone
It created the 2 sensors but the states are unknown
Did a workaround by using api and editing switch.py script from integration
I added it as a attribute to the switch
I added these lines below, if there is any interest and no issues while testing i can do a PR.
ATTR_NEXT_START_TIME = "next_start_time"
next_runtime = orbit_time_to_local_time( status.get("next_start_time") ).isoformat()
if not is_watering: self._attrs.update( { ATTR_NEXT_START_TIME: next_runtime, } )
I am no longer supporting these scripts