Closed holger-tangermann closed 5 months ago
I suspect the issue is the ä
character being invalid for HA entities. I don't have plans to fix this anytime soon due to time, perhaps you could submit a small change via a PR?
I removed the character. The script runs now. However, the sensor values calculated by the script, do not match to the values calculated within the b-hyve app and do not fit to the runtime of the programs for the zones. Any hint what I can do?
I am no longer supporting these custom python scripts
Describe the bug when calling the script in HA via developer tools page with << service: python_script.bhyve_next_watering data: {entity_id: switch.beet_zone, switch.rasen_seite_zone, switch.tropfbewasserung_zone, switch.rasenflache_zone}
Expected behaviour creates or updates entities named sensor.{zone_name}_next_watering and sensor.{device_name}_rain_delay_finishing.
BHyve devices Bhyve Indoor 4 zones
Logs
Logger: homeassistant.components.python_script.bhyve_next_watering.py Source: core.py:1041 Integration: Python Scripts (documentation, issues) First occurred: 18:00:42 (3 occurrences) Last logged: 18:08:47
Error executing script: Invalid entity id encountered: sensor.garten_bewässerung_rain_delay_finishing. Format should be.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/python_script/init.py", line 224, in execute
exec(compiled.code, restricted_globals)
File "bhyve_next_watering.py", line 55, in
File "/usr/src/homeassistant/homeassistant/core.py", line 1290, in set
run_callback_threadsafe(
File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 445, in result
return self.get_result()
File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 390, in get_result
raise self.exception
File "/usr/src/homeassistant/homeassistant/util/async.py", line 64, in run_callback
future.set_result(callback(*args))
File "/usr/src/homeassistant/homeassistant/core.py", line 1361, in async_set
state = State(
File "/usr/src/homeassistant/homeassistant/core.py", line 1041, in init
raise InvalidEntityFormatError(
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: sensor.garten_bewässerung_rain_delay_finishing. Format should be .