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

Adjust time with 0 percent does not work #132

Closed
mngsps opened this issue Aug 7, 2023 · 16 comments
Closed

Adjust time with 0 percent does not work #132

mngsps opened this issue Aug 7, 2023 · 16 comments

Comments

@mngsps
Copy link

mngsps commented Aug 7, 2023

Dear all,

thank you for this gorgeous integration!
I'm using a RainBird RC2 controller with 8 zones and I'd love to adapt your suggested automation (https://github.com/rgc99/irrigation_unlimited/blob/master/packages/irrigation_unlimited_adjustment.yaml) by values provided by OpenWeatherMap integration for time adjustment.
Furthermore, a local rain sensor is connected to my controller and available in home assistant.
Any idea how to combine the adjustment automation (based on OpenWeatherMap data) with my local rain sensor (e.g. no watering when rain detected by sensor)?

Thank you a lot for your help and kind regards
Benedikt

@mngsps
Copy link
Author

mngsps commented Aug 7, 2023

@rgc99 rgc99 closed this as completed Aug 7, 2023
@rgc99
Copy link
Owner

rgc99 commented Aug 9, 2023

Your configuration is

irrigation_unlimited:
  controllers:
    - name: "Rain Bird RC2"
      enabled: true
      zones:
        - name: "Rasen Eingang"
          enabled: true
          entity_id: "switch.rain_bird_z1_rasen_eingang"
        - name: "Rasen Feige"
          enabled: true
          entity_id: "switch.rain_bird_z2_rasen_feige"
        - name: "Rasen Magnolie"
          enabled: true
          entity_id: "switch.rain_bird_z3_rasen_magnolie"
        - name: "Rasen vorne"
          enabled: true
          entity_id: "switch.rain_bird_z4_rasen_vorne"
        - name: "Rasen hinten"
          enabled: true
          entity_id: "switch.rain_bird_z5_rasen_hinten"
        - name: "Hecken Treppe"
          enabled: true
          entity_id: "switch.rain_bird_z6_hecken_treppe"
        - name: "Beet oben"
          enabled: true
          entity_id: "switch.rain_bird_z7_beet_oben"
        - name: "Beet unten"
          enabled: true
          entity_id: "switch.rain_bird_z8_beet_unten"
      sequences:
        - name: "Rasen"
          enabled: true
          schedules:
            - time: "06:00"
              duration: "00:50"
          zones:
            - zone_id: 1
              enabled: true
              duration: "00:10"
            - zone_id: 2
              enabled: true
              duration: "00:10"
            - zone_id: 3
              enabled: true
              duration: "00:10"
            - zone_id: 4
              enabled: true
              duration: "00:10"
            - zone_id: 5
              enabled: true
              duration: "00:10"
        - name: "Beete"
          enabled: true
          schedules:
            - time: "05:00"
              duration: "01:00"
          zones:
            - zone_id: 6
              enabled: true
              duration: "00:20"
            - zone_id: 7
              enabled: true
              duration: "00:20"
            - zone_id: 8
              enabled: true
              duration: "00:20"

@rgc99 rgc99 reopened this Aug 9, 2023
@rgc99 rgc99 changed the title How to include rain sensor in automation Adjust time with 0 percent does not work Aug 9, 2023
@rgc99
Copy link
Owner

rgc99 commented Aug 9, 2023

What I need is the Irrigation Unlimited log file. Please restart and duplicate the issue. Follow the instructions below to access the Home Assistant log files.

These messages are very important in helping to determine the problem. Go into Settings -> System -> Logs. In the search box put in irrigation_unlimited (Note the underscore between the two words) and press the LOAD FULL LOGS button. Copy and paste the messages.

@Kolia56
Copy link

Kolia56 commented Aug 9, 2023

I have a similar configuration, 2 sequences, and 13 zones. Adjusting to 0% at controller level or at sequence level does work, at least card displays watering time to 0. I haven't checked whether it will result to no watering. Care should be taken to not adjust anything at zone level when using sequences as it is advertised in the documentation.
By the way I'm using the latest version of both components

irrigation_unlimited:
  controllers:
    name: "Controleur 1"
    all_zones_config:
      show:
        timeline: true
      allow_manual: true
    zones:
      - name: Café François
        zone_id: "1"
        entity_id: switch.vanne_atelier_gui
      - name: Serre
        zone_id: "2"
        entity_id: switch.vanne_maison_journalier_gui
      - name: Pelouse
        zone_id: "3"
        entity_id : switch.vanne_jardin_devant_gui
        maximum: "00:50:00"
      - name: Deux carrés
        zone_id: "4"
        entity_id: switch.vanne_deux_carres_gui
      - name: Un carré
        zone_id: "5"
        entity_id: switch.vanne_un_carre_gui
      - name: Petits fruits
        zone_id: "6"
        entity_id: switch.vanne_petits_fruits_gui
      - name: Haie - Céanothe - Fleurs
        zone_id: "7"
        entity_id: switch.vanne_haie_gui
      - name: Pommiers
        zone_id: "8"
        entity_id: switch.vanne_pommiers_gui
      - name: Pare-terre Julie 
        zone_id: "9"
        entity_id: switch.vanne_buanderie_grande_maison_gui
      - name : Haies pelouses
        zone_id: "10"
        entity_id: switch.718
      - name: If Cour carrée
        entity_id: switch.vanne_salle_claudine_gui
        zone_id: "11"
      - name: Haie du fond
        zone_id: "12"
        entity_id: switch.vanne_haie_fond_gui
      - name: Tilleul
        zone_id: "13"
        entity_id: switch.vanne_tilleul_gui
    sequences:
      - name: nuit
        schedules:
          - name: 1
            time: "22:00"
            schedule_id: "s1"
        zones:
          - zone_id: 1 # Café François
            duration: "00:30"
          - zone_id: 2 # Serre et autres
            duration: "00:20"
          - zone_id: 9 # Pare-terre Julie
            duration: "00:30"
          - zone_id: 4 # Deux carrés
            duration: "00:29"
          - zone_id: 5 # Un carré
            duration: "00:20"
          - zone_id: 6 # Petits fruits
            duration: "00:30"
          - zone_id: 7 # Haie - Céanothe
            duration: "00:40"
          - zone_id: 8 # Pommiers
            duration: "00:20"
          - zone_id: 10 # Haies pelouse
            duration: "00:25"
          - zone_id: 11 # If cour carrée
            duration: "00:10"
          - zone_id: 12 # Haie du fond
            duration: "00:30"            
          - zone_id: 13 # Tilleul - Cerisier
            duration: "00:30"    
          - zone_id: 3 # Pelouse
            duration: "00:40"        
      - name: jour
        duration: "00:05"
        delay: "02:25"
        repeat: 3
        schedules: 
          - name: 2
            time: "12:00"
            schedule_id: "s2"
        zones:
          - zone_id: 2

@mngsps
Copy link
Author

mngsps commented Aug 9, 2023

Thank you, a lot, for helping me!

This is the sequence I followed after restarting HA:

  1. Outcome of template after restart:
    image

  2. Result is fine:
    image

  3. Trying to set 0 percent:
    image

  4. Outcome is not fine / no change:
    image

  5. Resetting:
    image

  6. Outcome is fine:
    image

  7. Next try:
    image

  8. Again, no change:
    image

  9. Test with 1%:
    image

  10. Outcome is fine:
    image

This is the corresponding log:

2023-08-09 08:38:35.362 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration irrigation_unlimited which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-08-09 08:38:52.341 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'diagnostics', 'fritzbox', 'conversation', 'input_select', 'lovelace', 'webhook', 'fritz', 'mobile_app', 'input_datetime', 'scene', 'input_text', 'sun', 'webrtc', 'cast', 'automation', 'config', 'hacs', 'trace', 'overkiz', 'stream', 'google_assistant', 'cover', 'application_credentials', 'openweathermap', 'input_button', 'alarm_control_panel', 'group', 'camera', 'irrigation_unlimited', 'file_upload', 'generic', 'rtsp_to_webrtc', 'auth', 'light', 'persistent_notification', 'thread', 'rainbird', 'tag', 'shelly', 'device_automation', 'switch', 'counter', 'blueprint', 'spotify', 'tts', 'localtuya', 'input_boolean', 'ffmpeg', 'media_source', 'onboarding', 'search', 'presence_simulation', 'input_number', 'timer', 'analytics', 'fritzbox_callmonitor', 'script', 'met', 'logbook', 'schedule', 'image_upload', 'notify', 'androidtv_remote', 'person', 'repairs', 'spotcast', 'miele', 'sensor', 'history', 'pyscript'}
2023-08-09 08:38:58.346 INFO (MainThread) [homeassistant.setup] Setting up irrigation_unlimited
2023-08-09 08:38:58.347 INFO (MainThread) [custom_components.irrigation_unlimited]
https://github.com/rgc99/irrigation_unlimited/issues
2023-08-09 08:38:58.351 DEBUG (MainThread) [custom_components.irrigation_unlimited] LOAD
2023-08-09 08:38:58.353 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:38:58] controller: 0, zone: 0, entity: irrigation_unlimited.coordinator
2023-08-09 08:38:58.354 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {}
2023-08-09 08:38:58.354 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 1}
2023-08-09 08:38:58.355 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"percentage": 1.0, "sequence_id": 1}
2023-08-09 08:38:58.355 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 1, "zones": [1]}
2023-08-09 08:38:58.356 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"reset": null, "sequence_id": 1, "zones": [1]}
2023-08-09 08:38:58.356 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 1, "zones": [2]}
2023-08-09 08:38:58.356 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"reset": null, "sequence_id": 1, "zones": [2]}
2023-08-09 08:38:58.357 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 1, "zones": [3]}
2023-08-09 08:38:58.357 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"reset": null, "sequence_id": 1, "zones": [3]}
2023-08-09 08:38:58.357 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 1, "zones": [4]}
2023-08-09 08:38:58.358 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"reset": null, "sequence_id": 1, "zones": [4]}
2023-08-09 08:38:58.359 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 1, "zones": [5]}
2023-08-09 08:38:58.359 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"reset": null, "sequence_id": 1, "zones": [5]}
2023-08-09 08:38:58.359 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 2}
2023-08-09 08:38:58.360 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"percentage": 11.0, "sequence_id": 2}
2023-08-09 08:38:58.360 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 2, "zones": [1]}
2023-08-09 08:38:58.360 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"reset": null, "sequence_id": 2, "zones": [1]}
2023-08-09 08:38:58.361 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 2, "zones": [2]}
2023-08-09 08:38:58.361 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"reset": null, "sequence_id": 2, "zones": [2]}
2023-08-09 08:38:58.361 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 0, data: {"sequence_id": 2, "zones": [3]}
2023-08-09 08:38:58.361 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 0, data: {"reset": null, "sequence_id": 2, "zones": [3]}
2023-08-09 08:38:58.362 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 1, data: {}
2023-08-09 08:38:58.362 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 1, data: {"reset": null}
2023-08-09 08:38:58.362 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 2, data: {}
2023-08-09 08:38:58.363 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 2, data: {"reset": null}
2023-08-09 08:38:58.363 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 3, data: {}
2023-08-09 08:38:58.363 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 3, data: {"reset": null}
2023-08-09 08:38:58.363 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 4, data: {}
2023-08-09 08:38:58.363 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 4, data: {"reset": null}
2023-08-09 08:38:58.364 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 5, data: {}
2023-08-09 08:38:58.364 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 5, data: {"reset": null}
2023-08-09 08:38:58.364 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 6, data: {}
2023-08-09 08:38:58.364 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 6, data: {"reset": null}
2023-08-09 08:38:58.365 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 7, data: {}
2023-08-09 08:38:58.365 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 7, data: {"reset": null}
2023-08-09 08:38:58.365 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: enable, controller: 1, zone: 8, data: {}
2023-08-09 08:38:58.365 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:38:58] service: adjust_time, controller: 1, zone: 8, data: {"reset": null}
2023-08-09 08:38:58.383 DEBUG (MainThread) [custom_components.irrigation_unlimited] START
2023-08-09 08:38:58.383 INFO (MainThread) [homeassistant.setup] Setup of domain irrigation_unlimited took 0.0 seconds
2023-08-09 08:39:08.489 INFO (MainThread) [custom_components.pyscript.global_ctx] Loaded /config/pyscript/irrigation_unlimited_service_shim.py
2023-08-09 08:39:13.007 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.irrigation_unlimited
2023-08-09 08:39:13.060 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 0, entity: binary_sensor.irrigation_unlimited_c1_m
2023-08-09 08:39:13.062 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 1, entity: binary_sensor.irrigation_unlimited_c1_z1
2023-08-09 08:39:13.065 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 2, entity: binary_sensor.irrigation_unlimited_c1_z2
2023-08-09 08:39:13.066 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 3, entity: binary_sensor.irrigation_unlimited_c1_z3
2023-08-09 08:39:13.068 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 4, entity: binary_sensor.irrigation_unlimited_c1_z4
2023-08-09 08:39:13.070 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 5, entity: binary_sensor.irrigation_unlimited_c1_z5
2023-08-09 08:39:13.073 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 6, entity: binary_sensor.irrigation_unlimited_c1_z6
2023-08-09 08:39:13.075 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 7, entity: binary_sensor.irrigation_unlimited_c1_z7
2023-08-09 08:39:13.078 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2023-08-09 08:39:13] controller: 1, zone: 8, entity: binary_sensor.irrigation_unlimited_c1_z8
2023-08-09 08:39:29.288 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_adjustment] Initialized trigger Irrigation Unlimited Adjustment
2023-08-09 08:39:29.289 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_load_ui_controls] Irrigation Unlimited Load UI Controls: Running automation actions
2023-08-09 08:39:29.289 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_load_ui_controls] Irrigation Unlimited Load UI Controls: Executing step call service
2023-08-09 08:39:29.290 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_load_ui_controls] Initialized trigger Irrigation Unlimited Load UI Controls
2023-08-09 08:39:29.306 DEBUG (MainThread) [custom_components.irrigation_unlimited] INITIALISED
2023-08-09 08:39:30.912 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_adjustment] Irrigation Unlimited Adjustment: Running automation actions
2023-08-09 08:39:30.913 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_adjustment] Irrigation Unlimited Adjustment: Executing step call service
2023-08-09 08:39:30.942 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_load_ui_controls] Irrigation Unlimited Load UI Controls: Executing step call service
2023-08-09 08:39:30.992 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:39:30] service: adjust_time, controller: 1, zone: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_m"], "sequence_id": 0, "percentage": 11.0}
2023-08-09 08:40:42.696 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:40:42] service: adjust_time, controller: 1, zone: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_m"], "sequence_id": 0, "percentage": 0.0}
2023-08-09 08:41:41.048 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:41:41] service: adjust_time, controller: 1, zone: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_m"], "sequence_id": 0, "reset": null}
2023-08-09 08:43:28.727 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:43:28] service: adjust_time, controller: 1, zone: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_m"], "sequence_id": 0, "percentage": 0.0}
2023-08-09 08:44:11.237 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-09 08:44:11] service: adjust_time, controller: 1, zone: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_m"], "sequence_id": 0, "percentage": 1.0}

@mngsps
Copy link
Author

mngsps commented Aug 9, 2023

I have a similar configuration, 2 sequences, and 13 zones. Adjusting to 0% at controller level or at sequence level does work, at least card displays watering time to 0. I haven't checked whether it will result to no watering. Care should be taken to not adjust anything at zone level when using sequences as it is advertised in the documentation.
By the way I'm using the latest version of both components

So this is a comparable bot nut identical issue, since in my setup nothing changes at all when adjusting time to 0%...

@Kolia56
Copy link

Kolia56 commented Aug 9, 2023

Could you try this:

  • first of all restart HA to make sure everything is clean
  • then at controller level this piece of code (with developer/services
service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  percentage: 0

The result should be two sequences set to 0, hence all zones will be set to 0
Then reset

service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  reset:

Should be back to original values. Then try at sequence level

service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  sequence_id: 1
  percentage: 0

This should act on sequence_id 1
Likewise you may try with sequence_id 2
Then to reset everything back to original status, you may test

service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  sequence_id: 0
  percentage: 100

On my side this as been tested and is working
But, at soon you have started to use adjust_time at sequence level, using it at controller level does not work anymore until sequences have been reset. Then this piece of code should be used to reset all sequences, or you may decide to reset only one by one

service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  sequence_id: 0
  reset: 

@mngsps
Copy link
Author

mngsps commented Aug 9, 2023

The result should be two sequences set to 0, hence all zones will be set to 0

Regrettably, as mentioned earlier, adjust_time does not work for me when setting percentage to 0. Regardless the level (controller or sequence) and regardless the timepoint of execution (after restaring HA, after resetting adjust_time or after setting other percentages)

@Kolia56
Copy link

Kolia56 commented Aug 9, 2023

Hum, strange. There is one difference between your configuration and mine. In zones you haven't defined zone_id's. Could you try that?

@mngsps
Copy link
Author

mngsps commented Aug 9, 2023

Makes no difference...

@rgc99
Copy link
Owner

rgc99 commented Aug 10, 2023

Good news, I have set this up on the workbench and was able to reproduce the issue. Looks like a refresh problem but will know more later.

One thing to note is the adjustment displayed in the zone is for the next scheduled sequence. As the adjustment is specific to a particular sequence it will change depending on what's up next. As mentioned previously setting the adjustment to 0 is more or less disabling it. Now from the zones perspective there is no future schedule so it will not display any schedule or adjustment.

rgc99 added a commit that referenced this issue Aug 10, 2023
@mngsps
Copy link
Author

mngsps commented Aug 10, 2023

OK, good to know. So at the moment we cannot help and need to wait, right?

@rgc99
Copy link
Owner

rgc99 commented Aug 10, 2023

Not at all. Dive into the repository and get everything under custom_components/irrigation_unlimited and copy to your system under /config/custom_components/irrigation_unlimited and restart. Happy for the additional testing. There is a new suspend feature #106 you might be interest in.

@mngsps
Copy link
Author

mngsps commented Aug 10, 2023

This crashed it (cannot restart anymore):

Protokolldetails (FEHLER)
Logger: homeassistant.components.websocket_api.http.connection
Source: components/hassio/__init__.py:579
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 16:44:54 (1 occurrences)
Last logged: 16:44:54

[140404658069184] The system cannot restart because the configuration is not valid: Component error: irrigation_unlimited - cannot import name 'ATTR_SUSPENDED' from 'custom_components.irrigation_unlimited.const' (/config/custom_components/irrigation_unlimited/const.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 579, in async_handle_core_service
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Component error: irrigation_unlimited - cannot import name 'ATTR_SUSPENDED' from 'custom_components.irrigation_unlimited.const' (/config/custom_components/irrigation_unlimited/const.py)

@mngsps
Copy link
Author

mngsps commented Aug 10, 2023

I reloaded the component via HACS and copied the files again: Now it works! Thank you! :-)

@rgc99
Copy link
Owner

rgc99 commented Aug 11, 2023

Looks like you missed the const.py file. Good recovery, well done.
Enjoy.

@rgc99 rgc99 closed this as completed Aug 14, 2024
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

3 participants