Skip to content

Commit

Permalink
Replace hyphens with underscores in script. Fix #45
Browse files Browse the repository at this point in the history
  • Loading branch information
sebr committed Mar 1, 2021
1 parent e80964a commit 82ae80f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python_scripts/bhyve_next_watering.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

logger.info("updating next_watering for zone: ({}: {})".format(zone_name, zone))

next_watering_entity = f"sensor.{zone_name}_next_watering".replace(" ", "_").lower()
next_watering_entity = f"sensor.{zone_name}_next_watering".replace(" ", "_").replace("-", "_").lower()
next_watering_attrs = {"friendly_name": f"{zone_name} next watering"}

rain_delay_finishing_entity = f"sensor.{device_name}_rain_delay_finishing".replace(
" ", "_"
).lower()
).replace("-", "_").lower()
rain_delay_finishing_attrs = {"friendly_name": f"{device_name} rain delay finishing"}

rain_delay = hass.states.get(f"switch.{device_name}_rain_delay")
Expand Down

0 comments on commit 82ae80f

Please sign in to comment.