h4nc
October 15, 2019, 4:43pm
205
I first noticed that my sensor doesn’t work any more. It looks like this:
netatmo_thermostat_mode:
value_template: >-
{% set devices = [ states.climate.netatmo_device1,
states.climate.netatmo_device2,
states.climate.netatmo_device3,
states.climate.netatmo_device4,
states.climate.netatmo_device5 ] %}
{% set auto_amount = devices | selectattr('attributes.operation_mode','eq','auto') | list | length %}
{{ 'auto' if auto_amount == devices | length else 'manual' }}
It stays at manual, but it has to show auto, because all sensors are in “auto” mode.
After that I checked the climate entities. the following happens:
When I change a device in the netatmo app it DOESN’T get reported to home assistant any more. So it stays at auto even if it is in manual.
When I change the device in home assistant I can see the temp change in the App
So both systems are still connected but something is wrong.
Before opening a new issue, I’d like to ask if someone here can reproduce this behaviour.
Thanks
cgtobi
(Tobi)
October 16, 2019, 9:16am
206
There is no attribute operation_mode
since the climate refactor.
Try:
netatmo_thermostat_mode:
value_template: >-
{% set devices = [ states.climate.netatmo_device1,
states.climate.netatmo_device2,
states.climate.netatmo_device3,
states.climate.netatmo_device4,
states.climate.netatmo_device5 ] %}
{% set auto_amount = devices | selectattr('state','eq','auto') | list | length %}
{{ 'auto' if auto_amount == devices | length else 'manual' }}
1 Like
h4nc
October 16, 2019, 9:56am
207
Thanks, this works. But I still have my second issue.
h4nc:
After that I checked the climate entities. the following happens:
When I change a device in the netatmo app it DOESN’T get reported to home assistant any more. So it stays at auto even if it is in manual.
When I change the device in home assistant I can see the temp change in the App
So both systems are still connected but something is wrong.
Before opening a new issue, I’d like to ask if someone here can reproduce this behaviour.
cgtobi
(Tobi)
October 16, 2019, 11:46am
208
Hm, that works fine here also.
Gav_in
(Gavin)
October 16, 2019, 12:02pm
209
No issues for me either…change temp/schedule in App and it’s refelcted in HA after a few minutes
1 Like
cgtobi
(Tobi)
October 16, 2019, 12:42pm
210
There is a gap as we only query the netatmo api every 5 or 10 minutes.
1 Like
h4nc
October 16, 2019, 8:54pm
211
Even after an hour the state doesn’t get updated from “auto” to “manual”.
Any suggestions on how to fix this?
Edit: notices the following. The states of the entities stay at “auto”.
But when I look at the entities in Lovelace I can see the difference between a device in auto or manual mode. (With some delay as you mentioned).
So how to get that information back into the state of the entity. Could it be a translation issue?
h4nc
October 17, 2019, 6:40pm
212
How does that state look for you in Lovelace?
cgtobi
(Tobi)
October 17, 2019, 9:24pm
213
When the set point is set manually:
state: auto
hvac_action: idle
preset_mode: manual
When a schedule is dialed in:
state: auto
hvac_action: idle
preset_mode: Schedule
h4nc
October 18, 2019, 7:05am
214
I see. So we don’t look at the state any more, because that’ what changed in the past.
So state will always stay at auto
? If yes why don’t have the preset_mode
in state
as before
cgtobi
(Tobi)
October 18, 2019, 7:29am
215
Well, there was a big refactoring effort some month ago across all climate components. state
actually can be off
, auto
and heat
.
1 Like
h4nc
October 18, 2019, 8:17am
216
Ok, probably did not notice that because I don’t use those entities in summer.
With that information I was able to modify the sensor code above. It works again. It gives a fast overview if all thermostats are in auto or if at least one is set to manual.
netatmo_thermostat_mode:
value_template: >-
{% set devices = [ states.climate.netatmo_device1.attributes,
states.climate.netatmo_device2.attributes,
states.climate.netatmo_device3.attributes,
states.climate.netatmo_device4.attributes,
states.climate.netatmo_device5.attributes ] %}
{% set auto_amount = devices | selectattr('preset_mode','eq','Schedule') | list | length %}
{{ 'Schedule' if auto_amount == devices | length else 'manual' }}
1 Like
h4nc
October 18, 2019, 8:26am
217
I just checked my other netatmo thermostat entities and noticed that my boiler state sensor doesn’t work any more.
It seems like the boiler state attribute is gone too? Do you know how to get that value?
- platform: template
sensors:
netatmo_boiler_status:
friendly_name: 'Boiler'
value_template: '{{ states.climate.netatmo_device1.attributes.boiler_status }}'
icon_template: >
{%- set boiler = states.climate.netatmo_device1.attributes.boiler_status -%}
{%- if boiler -%} mdi:fire {% elif not boiler %} mdi:leaf {% endif %}
h4nc
October 21, 2019, 5:11pm
218
So the boiler state is gone right?
cgtobi
(Tobi)
October 21, 2019, 7:08pm
219
I think what you want is now called hvac_action
.
{{ state_attr('climate.netatmo_device1', 'hvac_action') == 'heating' }}
h4nc
October 21, 2019, 9:43pm
220
Thanks, yes that’s what I was looking for.
Unfortunately I get an error:
Error loading /config/configuration.yaml: while parsing a block mapping
in "/config/binarysensor.yaml", line 89, column 7
expected <block end>, but found '<scalar>'
in "/config/binarysensor.yaml", line 90, column 40
netatmo_boiler_status:
friendly_name: 'Boiler'
value_templates: '{{ state_attr('climate.netatmo_device1', 'hvac_action') == 'heating' }'
Couldn’t figure it out. Works fine in the devtool template section but not in the yaml file.
cgtobi
(Tobi)
October 22, 2019, 8:43am
221
That is a quoting issue.
Try:
netatmo_boiler_status:
friendly_name: 'Boiler'
value_template: >
{{ state_attr('climate.netatmo_device1', 'hvac_action') == 'heating' }}
1 Like
h4nc
October 22, 2019, 3:44pm
222
This works, thanks.
Full working example to copy and paste:
- platform: template
sensors:
netatmo_boiler_status:
friendly_name: 'Boiler'
value_template: >
{{ state_attr('climate.netatmo_device1', 'hvac_action') == 'heating' }}
icon_template: >-
{% if state_attr('climate.netatmo_device1', 'hvac_action') == 'heating' %}
mdi:fire
{% else %}
mdi:leaf
{% endif %}
Will711990
(Will711990)
December 15, 2022, 9:25am
223
Hi everybody !
I up this topic, especialy for @cgtobi !
Could you add the possibility to select a date and hour of endtime ?
thank you !!!