petergridge / Irrigation-V5

Irrigation custom component for Home Assistant
GNU General Public License v3.0
69 stars 11 forks source link

Init.py missing in V5.4.18 #76

Closed Sdahl1234 closed 3 hours ago

Sdahl1234 commented 3 weeks ago

FYI: Works fine using the one from Master.

petergridge commented 3 weeks ago

Thanks for letting me know I have updated the release, not sure how that happened :)

Loic691 commented 3 weeks ago

Hi @petergridge Did you some changes on the last version ? Since few days, all my programs switch on each days. After programs I see the last cycle which is OK and the next one Ok too. But after somes times (I don't know what. I done other things in HA the reboot several times,...), I just saw now the last cycle is 10 days ago and next cycle for tomorrow.

The time of each program is different. But The last cycle of all programs are show the 2024 August 15 à 12h05... I don't change any settings for irrigation because It was working perfectly...

Very strange...

Note : I update for the last release few days ago. After reboot, the irrigation integration doesn't start. So I revert for last version. The you release another one, so I update with the latest.

Note that my frequency irrigation of one of my program is 3 days

petergridge commented 3 weeks ago

Hi @Loic691

Can you send me a copy of your configuration: image

It is best to load the full logs so you can capture the config: image

image

petergridge commented 3 weeks ago

@Loic691,

One more request can you check the logs for errors at the runtime of the program. I expect there will be an error occurring.

And have you upgraded to v5.4.20?

Loic691 commented 3 weeks ago

Yes 5.4.20 Here's my config

2024-08-26 09:34:16.904 WARNING (MainThread) [custom_components.irrigationprogram]
Program 1
name:Irrigation Prog1
start_time:input_datetime.irrigation_plantes_starttime
Zone 1
zone:switch.rt2_relay02_irrigation_gabionsud
water:input_number.irrigation_duree_plantes_gabion
rain_sensor:binary_sensor.irrigation_rain_sensor
ignore_rain_sensor:input_boolean.irrigation_disabled_rain_sensor
enable_zone:input_boolean.irrigation_zone2_enable
Zone 2
zone:switch.rt2_relay05_irrigation_haiesud
water:input_number.irrigation_duree_haie_sud
rain_sensor:binary_sensor.irrigation_rain_sensor
ignore_rain_sensor:input_boolean.irrigation_disabled_rain_sensor
enable_zone:input_boolean.irrigation_zone5_enable
Zone 3
zone:switch.rt2_relay09_irrigation_haieouest
water:input_number.irrigation_duree_haie_ouest
rain_sensor:binary_sensor.irrigation_rain_sensor
ignore_rain_sensor:input_boolean.irrigation_disabled_rain_sensor
enable_zone:input_boolean.irrigation_zone9_enable
show_config:input_boolean.irrigation_showoptions
device_type:generic
run_freq:input_select.irrigation_frequency_plantes
irrigation_on:input_boolean.irrigation_plantes_enabled
inter_zone_delay:input_number.irrigation_interzonedelai
interlock:True
Program 2
name:Prog2
start_time:input_datetime.irrigation_pelouse_starttime
Zone 1
zone:switch.rt2_relay03_irrigation_pelouseest
water:input_number.irrigation_duree_pelouse_est
wait:input_number.irrigation_time_between_cycle
repeat:input_number.irrigation_cycle_number
water_adjustment:sensor.rain_factor
rain_sensor:binary_sensor.irrigation_rain_or_clothes
ignore_rain_sensor:input_boolean.irrigation_disabled_rain_sensor
enable_zone:input_boolean.irrigation_zone3_enable
Zone 2
zone:switch.rt2_relay04_irrigation_pelousesudest
water:input_number.irrigation_duree_pelouse_sudest
wait:input_number.irrigation_time_between_cycle
repeat:input_number.irrigation_cycle_number
water_adjustment:sensor.rain_factor
rain_sensor:binary_sensor.irrigation_rain_sensor
ignore_rain_sensor:input_boolean.irrigation_disabled_rain_sensor
enable_zone:input_boolean.irrigation_zone4_enable
Zone 3
zone:switch.rt2_relay07_irrigation_pelouseouest
water:input_number.irrigation_duree_pelouse_ouest
wait:input_number.irrigation_time_between_cycle
repeat:input_number.irrigation_cycle_number
water_adjustment:sensor.rain_factor
rain_sensor:binary_sensor.irrigation_rain_sensor
ignore_rain_sensor:input_boolean.irrigation_disabled_rain_sensor
enable_zone:input_boolean.irrigation_zone7_enable
Zone 4
zone:switch.rt2_relay08_irrigation_pelousesud
water:input_number.irrigation_duree_pelouse_sud
wait:input_number.irrigation_time_between_cycle
repeat:input_number.irrigation_cycle_number
water_adjustment:sensor.rain_factor
rain_sensor:binary_sensor.irrigation_rain_sensor
ignore_rain_sensor:input_boolean.irrigation_disabled_rain_sensor
enable_zone:input_boolean.irrigation_zone8_enable
show_config:input_boolean.irrigation_showoptions
device_type:generic
run_freq:input_select.irrigation_frequency_pelouse
irrigation_on:input_boolean.irrigation_pelouse_enabled
inter_zone_delay:input_number.irrigation_interzonedelai
interlock:True
Program 3
name:Bordure Maison
start_time:input_datetime.irrigation_bordure_maison_starttime
device_type:generic
interlock:True
run_freq:input_select.irrigation_frequency_bordure_maison
irrigation_on:input_boolean.irrigation_bordure_maison_enabled
inter_zone_delay:input_number.irrigation_interzonedelai
Zone 1
zone:switch.rt2_relay01_irrigation_maisonsud
water:input_number.irrigation_duree_plantes_maison_sud
enable_zone:input_boolean.irrigation_zone1_enabled
rain_sensor:binary_sensor.irrigation_rain_sensor_bordure_maison
Zone 2
zone:switch.rt2_relay10_irrigation_maisonouest
water:input_number.irrigation_duree_maison_ouest
enable_zone:input_boolean.irrigation_zone10_enable
rain_sensor:binary_sensor.irrigation_rain_sensor_bordure_maison
Loic691 commented 3 weeks ago

And the log

2024-08-26 09:47:31.513 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay03_irrigation_pelouseest turned off
2024-08-26 09:47:31.513 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 09:41:00.002580+02:00
2024-08-26 09:47:31.514 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 09:47:31.514 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 09:41:00
2024-08-26 09:47:31.514 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 09:41:00.002580+02:00
2024-08-26 09:47:33.516 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay04_irrigation_pelousesudest turn on, runtime: 1618
2024-08-26 09:47:39.041 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'value2' is undefined when rendering '{{ value1 }} {{ value2 }} {{ value3 }}'
2024-08-26 09:47:39.041 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'value3' is undefined when rendering '{{ value1 }} {{ value2 }} {{ value3 }}'
2024-08-26 09:48:07.076 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay04_irrigation_pelousesudest turned off
2024-08-26 09:48:07.077 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 09:41:00.002580+02:00
2024-08-26 09:48:07.077 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 09:48:07.077 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 09:41:00
2024-08-26 09:48:07.077 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 09:41:00.002580+02:00
2024-08-26 09:48:13.080 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay07_irrigation_pelouseouest turn on, runtime: 598
2024-08-26 09:48:28.098 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay07_irrigation_pelouseouest turned off
2024-08-26 09:48:28.098 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 09:41:00.002580+02:00
2024-08-26 09:48:28.098 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 09:48:28.098 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 09:41:00
2024-08-26 09:48:28.099 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 09:41:00.002580+02:00
2024-08-26 09:48:34.101 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay08_irrigation_pelousesud turn on, runtime: 238
2024-08-26 09:48:41.108 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay08_irrigation_pelousesud turned off
2024-08-26 09:48:41.108 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 09:41:00.002580+02:00
2024-08-26 09:48:41.108 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 09:48:41.108 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 09:41:00
2024-08-26 09:48:41.108 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 09:41:00.002580+02:00
2024-08-26 09:48:55.461 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_turn_on Bordure Maison
2024-08-26 09:48:55.462 WARNING (MainThread) [custom_components.irrigationprogram] Could not find Program implementation switch.irrigation_prog1, ignored
2024-08-26 09:48:55.462 WARNING (MainThread) [custom_components.irrigationprogram] Could not find Program implementation switch.prog2, ignored
2024-08-26 09:48:56.463 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay10_irrigation_maisonouest turn on, runtime: 899
2024-08-26 09:49:00.001 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Scheduled run executed
2024-08-26 09:49:00.002 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_turn_on Irrigation Prog1
2024-08-26 09:49:00.002 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] zone - should run: false
2024-08-26 09:49:00.002 DEBUG (MainThread) [custom_components.irrigationprogram.switch] build_run_script - should run false rt2_relay05_irrigation_haiesud
2024-08-26 09:49:00.002 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 09:49:00.002 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 09:49:00
2024-08-26 09:49:00.003 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] zone - should run: false
2024-08-26 09:49:00.003 DEBUG (MainThread) [custom_components.irrigationprogram.switch] build_run_script - should run false rt2_relay09_irrigation_haieouest
2024-08-26 09:49:00.003 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 09:49:00.003 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 09:49:00
2024-08-26 09:49:01.003 WARNING (MainThread) [custom_components.irrigationprogram] Could not find Program implementation switch.prog2, ignored
2024-08-26 09:49:01.004 WARNING (MainThread) [custom_components.irrigationprogram] Irrigation Program 'Bordure Maison' terminated by 'Irrigation Prog1'
2024-08-26 09:49:01.004 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay02_irrigation_gabionsud turn on, runtime: 1799
2024-08-26 09:49:01.469 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay10_irrigation_maisonouest turned off
2024-08-26 09:49:01.469 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 09:49:01.469 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 09:49:00
2024-08-26 09:49:01.469 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun str 2024-08-15T12:02:05.375440+02:00
2024-08-26 09:49:01.506 ERROR (MainThread) [homeassistant.components.telegram_bot] Error sending message: Can't parse entities: can't find end of the entity starting at byte offset 47. Args: (660106904, 'Irrigation\nFin programm Arrosage switch.bordure_maison'), kwargs: {'parse_mode': <ParseMode.MARKDOWN>, 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'read_timeout': None, 'message_thread_id': None}
2024-08-26 09:49:02.073 WARNING (MainThread) [homeassistant.components.dnsip.sensor] Exception while resolving host: (1, 'DNS server returned answer with no data')
2024-08-26 09:49:02.073 WARNING (MainThread) [homeassistant.components.dnsip.sensor] Exception while resolving host: (1, 'DNS server returned answer with no data')
2024-08-26 09:49:10.013 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay02_irrigation_gabionsud turned off
2024-08-26 09:49:10.013 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 09:49:00.002220+02:00
2024-08-26 09:49:10.013 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 09:49:10.013 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 09:49:00
2024-08-26 09:49:10.013 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 09:49:00.002220+02:00
Loic691 commented 3 weeks ago

I enabled the logs for irrigation. Where can I find them ? In the general logs ? Is this these sent just a post higher ? image

I launch in auto mode, by changing time, the programms and stop them (No need irrigation at this moment ;-) ) I try to restart HA core At this moment, next run is always OK. I'm searching other way

petergridge commented 3 weeks ago

Yes you have sent me the debug logs.

Could you disable the two of the existing programs you have defined and then run the remaining program. image

Loic691 commented 3 weeks ago

Heres the log with juste one program and several zones

024-08-26 10:30:00.001 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Scheduled run executed
2024-08-26 10:30:00.001 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_turn_on Prog2
2024-08-26 10:30:00.003 WARNING (MainThread) [custom_components.irrigationprogram] Could not find Program implementation switch.irrigation_prog1, ignored
2024-08-26 10:30:01.004 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay03_irrigation_pelouseest turn on, runtime: 418
2024-08-26 10:31:21.630 WARNING (MainThread) [homeassistant.components.dnsip.sensor] Exception while resolving host: (1, 'DNS server returned answer with no data')
2024-08-26 10:31:21.630 WARNING (MainThread) [homeassistant.components.dnsip.sensor] Exception while resolving host: (1, 'DNS server returned answer with no data')
2024-08-26 10:31:36.127 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay03_irrigation_pelouseest turned off
2024-08-26 10:31:36.127 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 10:30:00.002037+02:00
2024-08-26 10:31:36.128 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 10:31:36.128 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 10:30:00
2024-08-26 10:31:36.128 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 10:30:00.002037+02:00
2024-08-26 10:31:42.132 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay04_irrigation_pelousesudest turn on, runtime: 1618
2024-08-26 10:31:48.139 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay04_irrigation_pelousesudest turned off
2024-08-26 10:31:48.139 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 10:30:00.002037+02:00
2024-08-26 10:31:48.139 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 10:31:48.140 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 10:30:00
2024-08-26 10:31:48.140 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 10:30:00.002037+02:00
2024-08-26 10:31:54.142 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay07_irrigation_pelouseouest turn on, runtime: 598
2024-08-26 10:31:59.149 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay07_irrigation_pelouseouest turned off
2024-08-26 10:31:59.149 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 10:30:00.002037+02:00
2024-08-26 10:31:59.149 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 10:31:59.149 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 10:30:00
2024-08-26 10:31:59.149 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 10:30:00.002037+02:00
2024-08-26 10:32:05.151 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay08_irrigation_pelousesud turn on, runtime: 238
2024-08-26 10:32:10.158 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay08_irrigation_pelousesud turned off
2024-08-26 10:32:10.158 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_finalise_run - finalise run - last_ran 2024-08-26 10:30:00.002037+02:00
2024-08-26 10:32:10.159 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - Recalculate the next run time
2024-08-26 10:32:10.159 DEBUG (MainThread) [custom_components.irrigationprogram.switch] update_next_run - stime: 10:30:00
2024-08-26 10:32:10.159 DEBUG (MainThread) [custom_components.irrigationprogram.irrigationzone] irrigationzone.nextrun datetime 2024-08-26 10:30:00.002037+02:00

Is this OK ? Because in the GUI I have next run in 3 days as my frequency is computed. I don't see in the log the date of 29 august 2024... In the attributes :

Rt2 relay03 irrigation pelouseest next run
29 août 2024 à 10:30:00
Rt2 relay04 irrigation pelousesudest next run
29 août 2024 à 10:30:00
Rt2 relay07 irrigation pelouseouest next run
29 août 2024 à 10:30:00
Rt2 relay08 irrigation pelousesud next run
29 août 2024 à 10:30:00

For the moment it is still always OK... in the GUI ! I tryed to restart HA core and my VM. Still OK...

petergridge commented 3 weeks ago

In the debug log I was not worrying about the date more the time for that section.

What is the value for Rain Factor? This could result in a very short run time.

And do you need both rain factor and rain sensor for the program?

For the config data it would be very helpful to see the values that you have for each item, can you add them into the data you sent? The next release I will update the list config option to include the values as well.

Loic691 commented 3 weeks ago

Hi Rain sensor is actually set to 0.1 but in the log, i manually stoped the program because it's too long to wait and no need to irrigate at this time. So I let the programm auto start and the I stop it each zone and send you the logs. It's so normal to have short run time

For rain sensor and rain factor, I used the first to modulate the tiime of switch on (with weather past and forecast) And the rain sensor to stop it when it's rainning for now or for special events. For exemple I have a switch in dashboard to set if I have clothes on the outdoor rack ;-). It's very usefull

All is working well since few month.

Here's value for a zone image

Loic691 commented 2 weeks ago

In parallel, where can I found the complete config of the Integration ? is it possible to get it in yaml mode ? I think historical I have issues with original names of program...

For now and my last post no problems. Hope it s good

Loic691 commented 2 weeks ago

Hi @petergridge Just for information, I had the issue again this morning... Yesterday my program launches (frequency each 3 days) and now this morning, the program run again ! I have no log because the starting time of the program was so early.... I will try to change the starting time to check in real time tomorrow

Loic691 commented 2 weeks ago

Hi I confirm the bug the morning again wich occurs in 100% of cases. After the bug the next cycle is programed in 3 days. To reproduce, I changed the time to few minutes after now. At this moment the next cycle is always in 3 days (just the time change), all is OK at this time./ I waited And the irrigation program started again instead of not launching...

In the log i just only have


2024-08-30 08:49:00.000 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Scheduled run executed
2024-08-30 08:49:00.001 DEBUG (MainThread) [custom_components.irrigationprogram.switch] async_turn_on Pelouse
2024-08-30 08:49:01.004 DEBUG (MainThread) [custom_components.irrigationprogram.switch] Switch async_turn_on rt2_relay03_irrigation_pelouseest turn on, runtime: 418

I have the impression that just time is taken into account and the date is not relevant.

Note I tried to reproduce with a new program and I have the same behabviour.

petergridge commented 2 weeks ago

Hi,

This is the expected behaviour if you change the time to a future time, if you move the time back it will maintain the 3 day frequency.

This how I support support multiple start times on one day, i.e. morning and night. If you have a text field instead of a date/time you can add multiple start times.

Loic691 commented 2 weeks ago

Do you change this behaviour recently ? I have an automation wich change the start time each day to sunrise time ? I have no issues before...

But why When I change time, the next runtime date is "in 3 days* while the program will run this day ?

Le lun. 2 sept. 2024, 05:21, Peter @.***> a écrit :

Hi,

This is the expected behaviour if you change the time to a future time, if you move the time back it will maintain the 3 day frequency.

This how I support support multiple start times on one day, i.e. morning and night. If you have a text field instead of a date/time you can add multiple start times.

— Reply to this email directly, view it on GitHub https://github.com/petergridge/Irrigation-V5/issues/76#issuecomment-2323736725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQE5FU5ORVODV6KGTBDCGDZUPKVFAVCNFSM6AAAAABM34IRNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTG4ZTMNZSGU . You are receiving this because you were mentioned.Message ID: @.***>

petergridge commented 2 weeks ago

I have been missing the issue sorry.

So here is my understanding of the problem:

  1. you have a sensor that sets the start time to sunrise and the frequency is every 3 days. So the start time changes every day
  2. It is not starting when you expect.

I have changed some coding in this area due to some instability so this has impacted this model.

I have configured my test environment to mimic this.

I will look at options to fix this,

I will see what I can come up with.

Loic691 commented 2 weeks ago

Yes I have an automation which set start time at each changing of sunset. More details, I change the time of 3 programs with different offset from sunrinse. Example :

The frequency is so adjusted by automation with the max temperature of the last 2/3 days and forecast. Example :

I used too the rain sensor to adjust the run time

This is my config for this year and it's working well until april without issues ;-) Since the last updates, this is not working.

It's strange because I tried to disable my "setting time" automation and the issue is the same. The programs run each days even if frequency is 3 days. I will try another test without changing starttime. So I have to wait 3 days to have the result !

petergridge commented 2 weeks ago

can you send me the automation you use to set the time

Loic691 commented 2 weeks ago

I added details in my last post ;-)

Here's my automation

alias: Auto - Jardin - Arrosage - Modification Heure démarrage lever soleil
description: ""
trigger:
  - platform: state
    entity_id:
      - sun.sun
    attribute: next_rising
condition:
  - condition: state
    entity_id: input_boolean.irrigation_force_sunrise
    state: "on"
action:
  - metadata: {}
    data:
      time: >-
        {{ (as_timestamp(state_attr('sun.sun', 'next_rising')) - 3600) |
        timestamp_custom('%H:%M') | replace(' 0', '') }}
    target:
      entity_id:
        - input_datetime.irrigation_pelouse_starttime
    alias: Définir heure arrosage gazon sunrise - 1 heure
    action: input_datetime.set_datetime
  - metadata: {}
    data:
      time: >-
        {{ (as_timestamp(state_attr('sun.sun', 'next_rising')) + 7200) |
        timestamp_custom('%H:%M') | replace(' 0', '') }}
    target:
      entity_id:
        - input_datetime.irrigation_plantes_starttime
    alias: Définir heure arrosage plantes sunrise + 2 heures
    action: input_datetime.set_datetime
  - metadata: {}
    data:
      time: >-
        {{ (as_timestamp(state_attr('sun.sun', 'next_rising')) + 10800) |
        timestamp_custom('%H:%M') | replace(' 0', '') }}
    target:
      entity_id:
        - input_datetime.irrigation_bordure_maison_starttime
    alias: Définir heure arrosage bordure maison sunrise + 3 heures
    action: input_datetime.set_datetime
mode: single
petergridge commented 17 hours ago

V2024.09.01 is up as a Beta, there has been a lot of change under the covers so please let me know if you experience issues.

Loic691 commented 16 hours ago

Updated. Following on the dedicated post https://github.com/petergridge/Irrigation-V5/issues/83