vormsty
(Vormsty)
November 1, 2020, 5:42pm
1
Hello, in configuration.yaml I hve the following plateform.
weather:
platform: environment_canada
latitude: 47.039822
longitude: -70.276841
name: l_islet
This work as expected.
I want to ad on my front end a curve of the outside temperature.
I lock on the platform using developpment tool and see many attribute from the weather.l_islet sensor.
So I add the followin line in the configuration.yaml for having a new sensor:
outside_temperature:
entity_id:
- weather.l_islet
value_template: "{{ state_attr(' weather.l_islet', 'temperature') }}"
unit_of_measurement: 'C'
I restarted the host, check with developpment tool.
Effectively, there is a new sensor: sensor.outside_temperature but the state remain in “non” state.
Can you help me to have the corresponding value ?
Many thanks in advance.
echopage
(riccardo)
November 1, 2020, 5:57pm
3
- platform: template
sensors:
outside_temp:
friendly_name: “Outside Temperature”
unit_of_measurement: “°C”
value_template: “{{ state_attr(‘weather.l_islet’, ‘temperature’) }}”
try this…
tom_l
November 1, 2020, 6:11pm
4
Those are the wrong sort of quotes. “ vs ". Both double and single.
vormsty
(Vormsty)
November 1, 2020, 6:50pm
5
Thanks for your help.
The value appears in quotes, for exemple “7,4”
The history graphe is not able to trace the curve.
Is that possible to cast it ?
Thanks for your help
tom_l
November 1, 2020, 7:20pm
6
value_template: >
{{ state_attr('weather.l_islet', 'temperature')|replace('"', '') }}
vormsty
(Vormsty)
November 1, 2020, 8:07pm
7
I try it but the result is the same…
tom_l
November 1, 2020, 8:23pm
8
Go to the developer tools states menu and take a screenshot of the attributes of weather.l_islet
and paste it here. You can drag and drop the image file into a forum post.
vormsty
(Vormsty)
November 1, 2020, 8:34pm
9
oh sorry it was a mistike for myself.
Sorry !
vormsty
(Vormsty)
November 1, 2020, 8:44pm
11
Yes thanks a lot for your help and patience !!
tom_l
November 1, 2020, 8:49pm
12
It’s rather rude to mark your own post as the answer. Mark the post that helped.
1 Like