Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103323

Remove °F from sensor data

$
0
0

I am attempting to adjust my thermostat based on outdoor temperature, but i cannot get the forecasted data to read because it is a string with °F added instead of just the number and i get this error

Executed: May 7, 2022, 6:00:00 AM
Error: In 'numeric_state': In 'numeric_state' condition: entity sensor.openweathermap_forecast_temperature state '°F' cannot be processed as a number

here is my automation. I wont know if there are any other errors because I cant get past step one

- id: '1651810037388'
  alias: thermostat
  description: ''
  trigger:
  - platform: time
    at: 06:00:00
  condition: []
  action:
  - choose:
    - conditions:
      - condition: numeric_state
        entity_id: sensor.openweathermap_forecast_temperature
        attribute: unit_of_measurement
        below: '65.0'
      sequence:
      - service: climate.set_temperature
        data:
          target_temp_high: 77
          target_temp_low: 73
        target:
          device_id: 8bcdcdf698609a3be9895bf989b4dc8b
      - service: climate.set_hvac_mode
        data:
          hvac_mode: heat_cool
    - conditions:
      - condition: numeric_state
        entity_id: sensor.openweathermap_forecast_temperature
        above: '65.0'
        below: '80.0'
        attribute: unit_of_measurement
      sequence:
      - service: climate.set_temperature
        data:
          target_temp_high: 76
          target_temp_low: 72
        target:
          entity_id: climate.upstairs_thermostat
      - service: climate.set_hvac_mode
        data:
          hvac_mode: heat_cool
        target:
          entity_id: climate.upstairs_thermostat
    - conditions:
      - condition: numeric_state
        entity_id: sensor.openweathermap_forecast_temperature
        attribute: unit_of_measurement
        above: '80.0'
        below: '95.0'
      sequence:
      - service: climate.set_hvac_mode
        data:
          hvac_mode: heat_cool
        target:
          entity_id: climate.upstairs_thermostat
      - service: climate.set_temperature
        data:
          target_temp_high: 77
          target_temp_low: 72
    - conditions:
      - condition: numeric_state
        entity_id: sensor.openweathermap_forecast_temperature
        attribute: unit_of_measurement
        above: '95.0'
      sequence:
      - service: climate.set_hvac_mode
        data:
          hvac_mode: heat_cool
        target:
          entity_id: climate.upstairs_thermostat
      - service: climate.set_temperature
        data:
          target_temp_high: 78
          target_temp_low: 74
    default: []
  mode: single

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103323

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>