dbrunt
(Daniel)
July 23, 2022, 12:56am
1
These sensors fail config validation - “expected float”
name: "Sun Azimuth SE"
# unique_id: sun_azimuth_se
lower: '{{ states( "input_number.azimuth_se_lower" ) | float(0) }}'
upper: '{{ states( "input_number.azimuth_se_upper" )|float(0) }}'
entity_id: sensor.sun_azimuth
- platform: threshold
name: "Sun Azimuth South"
# unique_id: sun_azimuth_south
lower: '{{ states( "input_number.azimuth_south_lower" )|float(0) }}'
upper: '{{ states( "input_number.azimuth_south_upper" )|float(0) }}'
entity_id: sensor.sun_azimuth
- platform: threshold
name: "Sun Azimuth SW"
# unique_id: sun_azimuth_sw
lower: '{{ states( "input_number.azimuth_sw_lower" )|float(0) }}'
upper: '{{ states( "input_number.azimuth_sw_upper" )|float(0) }}'
entity_id: sensor.sun_azimuth
Also, unique_id:
isn’t valid. Why?
tom_l
July 23, 2022, 1:20am
2
All integrations have different available configuration variables. They are defined in the documentation for the integration. Look at the Documentation for this integration:
tom_l
July 23, 2022, 1:45am
4
Suggest a feature, get fellow users to vote on it and see it happen.
Please search the category for an existing request first and vote on that instead of creating a duplicate if you find a relevant topic.
1 Like
Hi. What happened to this feature request ? What’s the recommended solution in the meantime?
“expected float” error
lower: '{{ states( "input_number.azimuth_se_lower" ) | float(0) }}'
upper: '{{ states( "input_number.azimuth_se_upper" )|float(0) }}'
dbrunt
(Daniel)
February 2, 2024, 5:45pm
7
For me rather than a threshold sensor where I could not template lower/upper, I’ve been using just a templated binary sensor.
- template:
- binary_sensor:
- name: "Sun Azimuth SE"
unique_id: sun_azimuth_se
state: '{{ states("sensor.sun_elevation")|float(0) > 5.0 and states("sensor.southeast_patio_illuminance_lux")|float(0) > states("input_number.outside_lux_trigger_point")|float(0) and states("input_number.azimuth_se_lower")|float(0) < states("sensor.sun_azimuth")|float(0) < states("input_number.azimuth_se_upper")|float(0) }}'
delay_on: 00:01:00
delay_off: 00:01:00
1 Like