I’ve got some z-wave multisensors coming in through an ISY (and the isy994 integration), and I’m trying to create an automation based on the temperature. Alas, the temp comes through with a ‘°f’ at it. For example, the template: {{ states(‘sensor.fridge_temp’) }}
gives me the value: 39.9°f
Yes, there is a "degree f’ string in the source of the data.
However, if I try {{ states(‘sensor.fridge_temp’) | int }} it gives me ‘0’. Similarly, if I try | float, it still gives me 0.0! So it clearly cannot convert the string with "degree f’ to a numeric value.
SO… How can I get this temp converted to a number?
Here is the raw attribute list of the underlying multisensor sensor that I have to work with (which I convert into the sensor.fridge_temp as a template sensor):
dew_point: 0°c
angle_position: 69%
TEMPEXH: 39.6°f
sound_volume: '-0.22016 dba'
wind_direction: 74°
RADON: 103 bq/m3
seismic_magnitude: 0 richter scale
barometric_pressure: 38.7 inhg
moisture: 4%
device_communication_errors: '0'
tank_capacity: 0 m³
uv_light: 0 uv index
luminance: 0 lux
battery_level: 100%
temperature: 39.7°f
humidity: 69%
friendly_name: Fridge Multilevel Sensor
Any suggestions? When I try to use the temp in an automation I get:
2020-09-04 11:43:21 WARNING (MainThread) [homeassistant.helpers.condition] Value cannot be processed as a number: <state sensor.fridge_temp=40.0°f; friendly_name=Fridge Temperature, device_class=temperature @ 2020-09-04T11:43:21.932685-04:00> (Offending entity: 40.0°f)
Thanks!