Templates unsupported in Threshold platform for upper: and lower:?

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?

All integrations have different available configuration variables. They are defined in the documentation for the integration. Look at the Documentation for this integration:

Feature request posted.

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) }}'

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