rgc99 / irrigation_unlimited

♒Irrigation controller for Home Assistant
MIT License
307 stars 45 forks source link

No "Next" task is displayed for zones #169

Open PaPa1ya opened 2 weeks ago

PaPa1ya commented 2 weeks ago

Version of the custom_component

2024.7.0, 2024.5.0

Configuration

irrigation_unlimited:
  refresh_interval: 5
  controllers:
  - name: "Насос 01"
    entity_id: "switch.umnaia_rozetka_01"
    preamble: '-0:00:03'
    postamble: '-0:00:03'
    queue_manual: true
    zones:
      - name: "Левая грядка"
        entity_id: "switch.rele_poliva_right"
      - name: "Центральная и правая грядка"
        entity_id: "switch.rele_poliva_center"
      - name: "Зона за теплицей"
        entity_id: "switch.rele_poliva_left"

Describe the bug

Hello, the error is as follows: When manually starting the irrigation of a zone that is placed in the queue (if another one is already running), the attributes next_name and related ones do not appear (checked through the status). I noticed this on the card I used from your example in the 'Next' zone line of this card.

However, if you add a zone to the queue twice in a row and then cancel one of the entries in the queue, the attributes appear. At the same time, in the controller card, 'Next' is always displayed correctly.

Debug log 2024.7.0

2024-07-05 19:20:51.431 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
2024-07-05 19:20:52.540 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'input_select', 'device_automation', 'lovelace', 'media_source', 'icsee_ptz', 'hacs', 'spook', 'schedule', 'map', 'tag', 'dlna_dms', 'input_number', 'backup', 'config', 'accuweather', 'system_health', 'trace', 'diagnostics', 'counter', 'tasmota', 'energy', 'homeassistant', 'pyscript', 'wake_word', 'intent', 'group', 'automation', 'xiaomi_miio', 'timer', 'assist_pipeline', 'radio_browser', 'ffmpeg', 'irrigation_unlimited', 'input_boolean', 'input_button', 'default_config', 'stream', 'tts', 'google_translate', 'yandex_smart_home', 'light', 'mqtt', 'stt', 'image_upload', 'blueprint', 'select', 'file_upload', 'sun', 'hardware', 'history', 'scene', 'conversation', 'person', 'my', 'persistent_notification', 'number', 'scheduler', 'onboarding', 'search', 'application_credentials', 'homeassistant_alerts', 'script', 'input_datetime', 'versatile_thermostat', 'input_text', 'zone', 'mobile_app', 'yandex_station', 'logbook', 'analytics', 'adaptive_lighting'}
2024-07-05 19:20:53.289 INFO (MainThread) [homeassistant.setup] Setting up irrigation_unlimited
2024-07-05 19:20:53.289 INFO (MainThread) [custom_components.irrigation_unlimited]
https://github.com/rgc99/irrigation_unlimited/issues
2024-07-05 19:20:53.292 DEBUG (MainThread) [custom_components.irrigation_unlimited] LOAD
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:20:53] controller: 0, zone: 0, sequence: 0, entity: irrigation_unlimited.coordinator
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: enable, controller: 1, zone: 0, sequence: 0, data: {}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: suspend, controller: 1, zone: 0, sequence: 0, data: {"reset": null}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: enable, controller: 1, zone: 1, sequence: 0, data: {}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: suspend, controller: 1, zone: 1, sequence: 0, data: {"reset": null}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: adjust_time, controller: 1, zone: 1, sequence: 0, data: {"reset": null}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: enable, controller: 1, zone: 2, sequence: 0, data: {}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: suspend, controller: 1, zone: 2, sequence: 0, data: {"reset": null}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: adjust_time, controller: 1, zone: 2, sequence: 0, data: {"reset": null}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: enable, controller: 1, zone: 3, sequence: 0, data: {}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: suspend, controller: 1, zone: 3, sequence: 0, data: {"reset": null}
2024-07-05 19:20:53.293 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:20:53] service: adjust_time, controller: 1, zone: 3, sequence: 0, data: {"reset": null}
2024-07-05 19:20:53.294 DEBUG (MainThread) [custom_components.irrigation_unlimited] START [2024-07-05 19:20:53]
2024-07-05 19:20:53.294 INFO (MainThread) [homeassistant.setup] Setup of domain irrigation_unlimited took 0.00 seconds
2024-07-05 19:20:54.786 INFO (MainThread) [custom_components.pyscript.global_ctx] Loaded /config/pyscript/irrigation_unlimited_service_shim.py
2024-07-05 19:20:54.851 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up irrigation_unlimited.binary_sensor
2024-07-05 19:20:54.852 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:20:54] controller: 1, zone: 0, sequence: 0, entity: binary_sensor.irrigation_unlimited_c1_m
2024-07-05 19:20:54.852 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:20:54] controller: 1, zone: 1, sequence: 0, entity: binary_sensor.irrigation_unlimited_c1_z1
2024-07-05 19:20:54.852 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:20:54] controller: 1, zone: 2, sequence: 0, entity: binary_sensor.irrigation_unlimited_c1_z2
2024-07-05 19:20:54.853 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:20:54] controller: 1, zone: 3, sequence: 0, entity: binary_sensor.irrigation_unlimited_c1_z3
2024-07-05 19:21:03.294 DEBUG (MainThread) [custom_components.irrigation_unlimited] INITIALISED
2024-07-05 19:21:03.294 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2024-07-05 19:21:03] Switch does not match current state: expected: off, found: unknown, switch: switch.umnaia_rozetka_01
2024-07-05 19:21:03.295 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2024-07-05 19:21:03] Switch does not match current state: expected: off, found: unknown, switch: switch.rele_poliva_right
2024-07-05 19:21:03.295 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2024-07-05 19:21:03] Switch does not match current state: expected: off, found: unknown, switch: switch.rele_poliva_center
2024-07-05 19:21:03.295 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2024-07-05 19:21:03] Switch does not match current state: expected: off, found: unknown, switch: switch.rele_poliva_left
2024-07-05 19:21:10.464 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_load_ui_controls] Irrigation Unlimited Load UI Controls: Running automation actions
2024-07-05 19:21:10.464 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_load_ui_controls] Irrigation Unlimited Load UI Controls: Executing step call service
2024-07-05 19:21:10.464 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_load_ui_controls] Initialized trigger Irrigation Unlimited Load UI Controls
2024-07-05 19:21:10.495 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_load_ui_controls] Irrigation Unlimited Load UI Controls: Executing step call service
2024-07-05 19:21:57.185 WARNING (MainThread) [custom_components.pyscript.file.irrigation_unlimited_service_shim.irrigation_unlimited_call_manual_run] invalid entity_id
2024-07-05 19:22:02.371 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:02] service: manual_run, controller: 1, zone: 1, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z1"], "time": "0:03:00"}
2024-07-05 19:22:03.001 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2024-07-05 19:22:03] controller: 1, zone: 1, state: 1, data: 1.0.0.0.0
2024-07-05 19:22:06.001 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2024-07-05 19:22:06] controller: 1, zone: 0, state: 1
2024-07-05 19:22:08.786 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:08] service: manual_run, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"], "time": "0:03:00"}
2024-07-05 19:22:17.597 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:17] service: manual_run, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"], "time": "0:03:00"}
2024-07-05 19:22:19.566 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:19] service: cancel, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"]}
2024-07-05 19:22:25.294 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:25] service: cancel, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"]}
2024-07-05 19:22:26.251 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:26] service: manual_run, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"], "time": "0:03:00"}
2024-07-05 19:22:30.349 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:30] service: cancel, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"]}
2024-07-05 19:22:31.175 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:31] service: cancel, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"]}
2024-07-05 19:22:34.507 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:22:34] service: cancel, controller: 1, zone: 1, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z1"]}
2024-07-05 19:22:34.507 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2024-07-05 19:22:34] controller: 1, zone: 1, state: 0
2024-07-05 19:22:34.508 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2024-07-05 19:22:34] controller: 1, zone: 0, state: 0

Debug log 2024.5.0

2024-07-05 19:10:42.843 INFO (MainThread) [custom_components.irrigation_unlimited]
2024-07-05 19:10:42.844 DEBUG (MainThread) [custom_components.irrigation_unlimited] LOAD
2024-07-05 19:10:42.844 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:10:42] controller: 0, zone: 0, sequence: 0, entity: irrigation_unlimited.coordinator
2024-07-05 19:10:42.844 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: enable, controller: 1, zone: 0, sequence: 0, data: {}
2024-07-05 19:10:42.844 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: suspend, controller: 1, zone: 0, sequence: 0, data: {"reset": null}
2024-07-05 19:10:42.844 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: enable, controller: 1, zone: 1, sequence: 0, data: {}
2024-07-05 19:10:42.845 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: suspend, controller: 1, zone: 1, sequence: 0, data: {"reset": null}
2024-07-05 19:10:42.845 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: adjust_time, controller: 1, zone: 1, sequence: 0, data: {"reset": null}
2024-07-05 19:10:42.845 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: enable, controller: 1, zone: 2, sequence: 0, data: {}
2024-07-05 19:10:42.845 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: suspend, controller: 1, zone: 2, sequence: 0, data: {"reset": null}
2024-07-05 19:10:42.845 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: adjust_time, controller: 1, zone: 2, sequence: 0, data: {"reset": null}
2024-07-05 19:10:42.845 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: enable, controller: 1, zone: 3, sequence: 0, data: {}
2024-07-05 19:10:42.845 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: suspend, controller: 1, zone: 3, sequence: 0, data: {"reset": null}
2024-07-05 19:10:42.845 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:10:42] service: adjust_time, controller: 1, zone: 3, sequence: 0, data: {"reset": null}
2024-07-05 19:10:42.846 DEBUG (MainThread) [custom_components.irrigation_unlimited] START [2024-07-05 19:10:42]
2024-07-05 19:10:43.400 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:10:43] controller: 1, zone: 0, sequence: 0, entity: binary_sensor.irrigation_unlimited_c1_m
2024-07-05 19:10:43.401 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:10:43] controller: 1, zone: 1, sequence: 0, entity: binary_sensor.irrigation_unlimited_c1_z1
2024-07-05 19:10:43.401 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:10:43] controller: 1, zone: 2, sequence: 0, entity: binary_sensor.irrigation_unlimited_c1_z2
2024-07-05 19:10:43.401 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2024-07-05 19:10:43] controller: 1, zone: 3, sequence: 0, entity: binary_sensor.irrigation_unlimited_c1_z3
2024-07-05 19:10:52.847 DEBUG (MainThread) [custom_components.irrigation_unlimited] INITIALISED
2024-07-05 19:10:52.847 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2024-07-05 19:10:52] Switch does not match current state: expected: off, found: unknown, switch: switch.umnaia_rozetka_01
2024-07-05 19:10:52.847 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2024-07-05 19:10:52] Switch does not match current state: expected: off, found: unknown, switch: switch.rele_poliva_right
2024-07-05 19:10:52.847 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2024-07-05 19:10:52] Switch does not match current state: expected: off, found: unknown, switch: switch.rele_poliva_center
2024-07-05 19:10:52.848 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2024-07-05 19:10:52] Switch does not match current state: expected: off, found: unknown, switch: switch.rele_poliva_left
2024-07-05 19:12:11.661 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:12:11] service: manual_run, controller: 1, zone: 1, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z1"], "time": "0:03:00"}
2024-07-05 19:12:12.001 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2024-07-05 19:12:12] controller: 1, zone: 1, state: 1, data: 1.0.0.0.0
2024-07-05 19:12:15.001 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2024-07-05 19:12:15] controller: 1, zone: 0, state: 1
2024-07-05 19:12:16.639 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:12:16] service: manual_run, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"], "time": "0:03:00"}
2024-07-05 19:12:25.829 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:12:25] service: manual_run, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"], "time": "0:03:00"}
2024-07-05 19:12:28.953 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:12:28] service: cancel, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"]}
2024-
Add your logs here.07-05 19:12:30.554 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:12:30] service: cancel, controller: 1, zone: 2, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"]}
2024-07-05 19:12:33.220 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2024-07-05 19:12:33] service: cancel, controller: 1, zone: 1, sequence: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z1"]}
2024-07-05 19:12:33.221 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2024-07-05 19:12:33] controller: 1, zone: 1, state: 0
2024-07-05 19:12:33.221 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2024-07-05 19:12:33] controller: 1, zone: 0, state: 0
rgc99 commented 2 weeks ago

I can reproduce this. Will have to dig deeper.

rgc99 commented 1 week ago

If you'r ok with updating out of the repository then give it a go.