2022-05-13 09:33:57 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'str object' has no attribute 'zone1' when rendering '{% set zone_duration = state_attr('sensor.irrigation_cycle1_duration_in_seconds', 'zone_duration') %} {{ zone_duration.zone1 }}'
At this point, it seems to me that the entity: sensor.irrigation_cycle1_zone1_actual_duration_in_seconds
should get the zone runtime in seconds. IThis does not happen, except for an error in the logs.
Currently it uses a workaround to enter zone run times in seconds directly into the entites: sensor.irrigation_cycle1_zoneX_actual_duration_in_seconds
Hello Guys,
First of all very nice integration.
I have noticed an issue when stopping a started cycle (using the stop button close to the Next Run section): it will stop the actual zone, but next zone will start after some time.
Is there also a way to request an exeptional skip of cycle for today : For example, I have a party in my garden in the evening and don’t want the cycle to start during the party !!
I found a solution. I added a from_json directive for zone_duration variables to de-serialize a JSON string back into an object.
#=== Actual Zone durations in seconds
irrigation_cycle1_zone1_actual_duration_in_seconds:
friendly_name: Cycle 1 Zone 1 Actual Duration In Seconds
value_template: >
{% set zone_duration = state_attr('sensor.irrigation_cycle1_duration_in_seconds', 'zone_duration') | from_json %}
{{ zone_duration.zone1 }}
Now the entered working time of the zones is converted correctly. The following log error has disappeared: Template variable warning: 'str object' has no attribute 'zone1' when rendering '{% set zone_duration = state_attr (' sensor.irrigation_cycle3_duration_in_seconds ',' zone_duration ')%} {{zone_duration.zone1}}'
Having issues with history totals showing. This has worked for a year or so and has recently stopped.
Sensors are still setup in the recorder and have values when viewing attributed in developer tools. Any ideas on what else I can check?
Firstly apologies for my absence here and on Github. Real life is taking over recently. I plan to catch up and deal with all the questions and queries in due course but it won’t be for a few weeks I’m afraid.
Just to confirm that the package does still work (on HA 2022.05), I have started using it again this year
@jgosnell - yes I noticed this too. It is as a result of 2022.05 removing the ‘pretty’ time attribute in the history stats. It is mentioned a s a breaking change in the release notes.
The workaround is in item_status_history_line.yaml change the custom_fields at the end of the file to the following.
Note that the result is not as ‘pretty’. The times are simply presented as a fraction of an hour. I intend to look into improving this at some point.
The whole history stats integration isn’t great (IMO). You may have noticed some strange rounding errors already. A big pull request was made (not by me) to improve it but it was rejected, possibly because ‘they’ plan to entirely overhaul it
custom_fields:
total_yesterday: >
[[[
var zone = '{{ zone }}';
return states['sensor.irrigation_' + zone + '_total_time_yesterday'].state;
]]]
total_today: >
[[[
var zone = '{{ zone }}';
return states['sensor.irrigation_' + zone + '_total_time_today'].state;
]]]
I have the same error… sometimes rebooting HA solves it, sometimes only the left one disappear and the right one stays there.
Have you found a solution?
Hi @klogg and all,
thanks to the many people experiences in the forum, I was able to install the project. Currently if I perform manual watering everything works (switch, history, etc), however if I program a irrigation cycle the watering does not start. It seems as if it carry on to the next schedule, without executing anything. Could you please give me some help?
Thank you all
Hi, I’m also still at 2022.5.5, with the new HA version there is a different management for template filter/function defaults. The file to be updated should be irrigation_cycle_update_start_time but I didn’t have time to fix it. Don’t know if anyone already looked at it. It should be the same problem that @asb.netatmo wrote few days ago.
I am sorry but I am not able to give HA any time right now, I’m not sure if I will even have time in the next few weeks to move to 2022.8
(EDIT: I just realised 2022.8 isn’t released at the time of writing!!)
I will definitely check it out when I can though.
Sorry…
I found some kind of similar error and in that case the issue was a special character (&) used in a Title, while that particular character is a special one for YAML.
So maybe there is something that, starting from 2022.7.x, is seen as an error.
Which lovelace files from this project I can check to see if there is something like this?
All my others lovelace (main and specific ones) are working fin, so since I had the irrigation system as a tab of my main dashboard, I decided to move as a separate one, otherwise I get the “unknown error” in the main dashboard.
I have found the solution. If you update HA to the latest version, you need to update the configuration file with mqtt entities as well, I leave you my file as an example.
Hi All.
I was looking for a simple solution from HiHome: Hihome Zigbee Smart Watercontoler
Sounds like a great device but I cannot find any info about integration in Home Assistant.
Anyone knows more about this?
Thanks