vinteo / hass-opensprinkler

OpenSprinkler Integration for Home Assistant
MIT License
208 stars 40 forks source link

Enable/Disable Additional Start Times #289

Closed hplato closed 3 months ago

hplato commented 4 months ago

Hello, I'm working to migrate away from some custom scripts to HA, and it is great to see a robust OpenSprinkler integration!

I'm working for figure out how to load a program, like [210,-1,-1,-1],[10,20,30,40,50]. I've been able to use the station_duration to set the times, and the start_offset to load up the times past midnight. However, occasionally I need to run a few programs in a day. It's no problem to update start1_offset, start2_offset, and start3_offset, however if I need to disable those times the next day, I don't know how to do it. if I use a 0, the additional start time is still enabled, with a midnight start date. I tried entering -1 in HA, but number has to be positive. Is there any way to get a enable/disabled switch for the additional run times? That would fully allow me to load new programs each day!

EdLeckert commented 4 months ago

It's already available. Set select.<program-name>_start<n>_time_offset_type to Disabled rather than Midnight.

My UI:

AdditionalStartTimes

- type: horizontal-stack
  cards:
    - type: custom:mushroom-entity-card
      entity: select.standard_schedule_start1_time_offset_type
      name: Start Type
      layout: vertical
      fill_container: true
    - type: custom:mushroom-entity-card
      entity: number.standard_schedule_start1_time_offset
      name: Offset
      layout: vertical
      fill_container: true
    - type: custom:mushroom-entity-card
      entity: time.standard_schedule_start1_time
      name: Starting
      layout: vertical
      fill_container: true
- type: horizontal-stack
  cards:
    - type: custom:mushroom-entity-card
      entity: select.standard_schedule_start2_time_offset_type
      name: Start Type
      layout: vertical
      fill_container: true
    - type: custom:mushroom-entity-card
      entity: number.standard_schedule_start2_time_offset
      name: Offset
      layout: vertical
      fill_container: true
    - type: custom:mushroom-entity-card
      entity: time.standard_schedule_start2_time
      name: Starting
      layout: vertical
      fill_container: true
- type: horizontal-stack
  cards:
    - type: custom:mushroom-entity-card
      entity: select.standard_schedule_start3_time_offset_type
      name: Start Type
      layout: vertical
      fill_container: true
    - type: custom:mushroom-entity-card
      entity: number.standard_schedule_start3_time_offset
      name: Offset
      layout: vertical
      fill_container: true
    - type: custom:mushroom-entity-card
      entity: time.standard_schedule_start3_time
      name: Starting
      layout: vertical
      fill_container: true
hplato commented 3 months ago

Thank so so much for the reply. Yup, I see that. I only looked at the first offset which didn't have a disabled. This helps me continue, thank you.