I’m having an issue with unit mismatch in a climate entity (broadlink + SmartIR), and I’m trying to fix it by manually converting units with a template sensor value and then trying to plug that value into the climate entity via customize
. I see that customize
doesn’t allow templates, so is there any other way to accomplish this? I have this (and have tried variations of it) in my configuration.yaml
:
# From https://community.home-assistant.io/t/convert-celsius-to-fahrenheit-in-sensor/271388/3
sensor:
- platform: template
sensors:
tom_office_ac_temp_f:
unique_id: tom_office_ac_temp_f
friendly_name: "Tom Office F"
unit_of_measurement: '°F'
value_template: >-
{% set t = states('sensor.remote_temperature') | float %}
{{((t)*9/5)+32}}
homeassistant:
customize:
# Add an entry for each entity that you want to overwrite.
climate.tom_office_ac:
current_temperature: "{{ states('sensor.tom_office_ac_temp_f') }}"
min_temp: 55
max_temp: 80
The value of the sensor is correct, and if I manually set the value from that sensor into this customize
block, it looks exactly as I want it to, so is there any way to actually plug that value into the block programmatically? I don’t actually expect the template I have for current_temperature
to work, since I’ve seen some things saying that customize doesn’t support templates, but I just included it to illustrate what I’m trying to achieve.