I have an esp32 minding my Daly BMS and have recently added a low wattage heat mat to the large battery box. I am attempting to use the Bang Bang Climate Controller to switch the heat mat on and off.
Sadly the default_target_temperature_low and default_target_temperature_high are being reported in the logs as nan
What have I missed or done incorrectly?
climate:
- platform: bang_bang # can add cooling fan to this using cool_action
name: "Battery Box Warmer"
sensor: battery_temperature_1
default_target_temperature_low: 13 °C
default_target_temperature_high: 17 °C
visual:
min_temperature: -5 °C
max_temperature: 45 °C
temperature_step:
target_temperature: 1
current_temperature: 1
heat_action:
- if:
condition:
and:
- lambda: 'return id(battery_level).state >= 25;'
- lambda: 'return id(min_cell_voltage).state >= 3.201;'
then:
- switch.turn_on: battery_warmer
idle_action:
- switch.turn_off: battery_warmer
# Automation to turn off the warmer if battery level or cell voltage drops below threshold
interval:
- interval: 10s
then:
- if:
condition:
or:
- lambda: 'return id(battery_level).state < 25;'
- lambda: 'return id(min_cell_voltage).state < 3.201;'
then:
- switch.turn_off: battery_warmer
[12:02:51][D][sensor:094]: 'Temperature 1': Sending state 12.00000 °C with 0 decimals of accuracy
[12:02:51][D][climate:396]: 'Battery Box Warmer' - Sending state:
[12:02:51][D][climate:399]: Mode: HEAT
[12:02:51][D][climate:401]: Action: OFF
[12:02:51][D][climate:419]: Current Temperature: 12.00°C
[12:02:51][D][climate:423]: Target Temperature: Low: nan°C High: nan°C
Notice that your min and max temperatures are actually strings and not numbers. The validation for the component should have flagged that for you. Remove the °C from your values and they will be numbers, which should work.
Not being able ot find a solution the other day I changed to using the Thermostat controller instead. That works but would prefer to use the bang bang…