Hey there!
when try to change the (select) state of my MQTT thing, my OH log says:
Command ' Free Running' from channel 'mqtt:homeassistant_ESPAltherma:mqtt_broker:ESPAltherma:espaltherma_5Fpl#select' not supported by type 'TextValue': Value Free Running not within range
Note the extra whitespace in front of the command!
Now, here is my MQTT payload (I’m completely new to MQTT):
{"availability":[{"topic":"espaltherma/LWT","payload_available":"Online","payload_not_available":"Offline"}],"availability_mode":"all","unique_id":"espaltherma_pl","device":{"identifiers":["ESPAltherma"],"manufacturer":"ESPAltherma","model":"M5StickC PLUS ESP32-PICO","name":"ESPAltherma"},"icon":"mdi:solar-power","name":"EspAltherma Power Limit","command_topic":"espaltherma/pl/set","command_template":"{% if value == 'Free Running' %} '0' {% elif value == 'Power Limit 1' %} '1' {% elif value == 'Power Limit 2' %} '2' {% elif value == 'Power Limit 3' %} '3' {% elif value == 'Power Limit 4' %} '4' {% else %} '0' {% endif %}","options":["Free Running","Power Limit 1","Power Limit 2","Power Limit 3","Power Limit 4"],"state_topic":"espaltherma/pl/state","value_template":"{% set mapper = { '0':'Free Running', '1':'Power Limit 1', '2':'Power Limit 2', '3':'Power Limit 3', '4':'Power Limit 4' } %} {% set word = mapper[value] %} {{ word }}"}
Any ideas where the whitespace comes from?
Background:
To control my HVAC depending on the availability of solar energy I want to make use of espAltherma in combination with a relay.
- Platform information:
- Hardware: RPI4 8GB
- OS: Ubuntu 22.04 LTS arm64
- Java Runtime Environment: Zulu17.44+15-CA (build 17.0.8+7-LTS)
- openHAB version: 4.0.2