Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequencing and zones #46

Closed
RTAeroHASS opened this issue Dec 14, 2021 · 9 comments
Closed

Sequencing and zones #46

RTAeroHASS opened this issue Dec 14, 2021 · 9 comments

Comments

@RTAeroHASS
Copy link

Hi i have an irrigation pump that i need enabled during the entire run. I'm not to sure where to insert the entity_id of the pump to have it switch on during the entire sequence

@rgc99
Copy link
Owner

rgc99 commented Dec 15, 2021

It should be under the controller. When any of the zones are on, the controller will be on. Hint: If you have a delay between zones in your sequence then consider using preamble and or the postamble settings to avoid the irrigation pump turning off and on. The setting should be at least the longest delay. For example:

# Example configuration.yaml entry
irrigation_unlimited:
  controllers:
    preamble: '00:01' # Cover the delay between zones and prevent pump on/off
    entity_id: 'switch.my_irrigation_pump'
    zones:
      - entity_id: 'switch.my_valve1'
      - entity_id: 'switch.my_valve2
    sequences:
      - duration: '00:10' # Without preamble the pump will turn off
        delay: '00:01'
        schedules:
          - time: '06:00'
        zones:
          - zone_id: 1
          - zone_id: 2

@RTAeroHASS
Copy link
Author

RTAeroHASS commented Dec 15, 2021 via email

@RTAeroHASS
Copy link
Author

RTAeroHASS commented Dec 15, 2021 via email

@rgc99
Copy link
Owner

rgc99 commented Dec 15, 2021

The log file should have an entry for the manual run call. Please post this. I am thinking if the call was for 1 second instead of 10 minutes you might get something like you describe.

@RTAeroHASS
Copy link
Author

RTAeroHASS commented Dec 15, 2021 via email

@RTAeroHASS
Copy link
Author

RTAeroHASS commented Jan 7, 2022 via email

@rgc99
Copy link
Owner

rgc99 commented Jan 8, 2022

This won't work. The config file is only used at startup or a reload so even if it were able to read the value from the input_datetime, changing it would not have any effect on the operation. The way to dynamically interact with the integration is via service calls. In this situation you would call the adjust_time service in an automation. When the input_datetime control changes an automation is triggered and a service call is made. Here is an example:

automation:
  - alias: Irrigation Unlimited Time Change
    trigger:
      - platform: homeassistant
        event: start
      - platform: state
        entity_id:
          - input_datetime.irrigation_auto_runtime
    action:
      service: irrigation_unlimited.adjust_time
      data:
        entity_id: binary_sensor.irrigation_unlimited_c1_m
        sequence_id: 1
        actual: >
          {{ states('input_datetime.irrigation_auto_runtime') }}

The above will trigger on HA startup or when the input_datetime control changes. Also take a look at the time-picker-card. You can get rid of the am/pm part to turn it from a time of day into a duration control. Note: The example has not been tested but the theory is sound.

@RTAeroHASS
Copy link
Author

RTAeroHASS commented Jan 8, 2022 via email

@rgc99
Copy link
Owner

rgc99 commented Sep 22, 2022

Assume all good now. Closing issue.

@rgc99 rgc99 closed this as completed Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants