Hello,
I’ve again a little problem setting up my BBQ WLANThermo. There is a rep how to integrate in at homeassistant-wlanthermo and with that (and google) almost everythin works. I now struggle with the file wlanthermo_template.yaml, specially Line 588.
I didn’t use the folders as in gitHub, I’ve put all template stuff in template.yaml and adjusted it:
- sensor:
- name: wlanthermo_pitmaster_value_color
unique_id: wlanthermo_pitmaster_value_color
availability: >
{{ not is_state('sensor.bbq_thermo','unavailable') }}
state: >
{{ state_attr('sensor.pitmaster_1_all', 'value_color') }}
- number:
- unique_id: wlanthermo_channel_1_max
name: >
#1 {{ state_attr('sensor.wlanthermo_channel_1_all', 'name') }} {% if is_state('input_boolean.wlanthermo_channel_1_timer','on') %}Target{% else %}Maximum{% endif %}
state: "{{ state_attr('sensor.wlanthermo_channel_1_all', 'max') | int(0) }}"
availability: >
{{ not is_state('sensor.wlanthermo_channel_1_all', 'unavailable') }}
set_value:
service: mqtt.publish
data_template:
topic: WLanThermo/MINIV3/set/channels
retain: true
payload: >
{"number":1,"max":{{ value }}}
min: 0
max: 300
step: 1
icon: mdi:thermometer-high
wlanthermo_pitmaster_value_color I can find at entities and works, but wlanthermo_channel_1_max is not listed anyware. Do I have to put them in input_number.yaml and what’s the correct syntax then? I just have one at the moment in there, this works (shows up) and looks like:
wlanthermo_pitmaster_temp:
name: Pit Solltemperatur
min: 0
max: 250
step: 1
unit_of_measurement: °C
icon: mdi:thermometer
mode: box
But I’m not able to set values over MQTT. Maybe its also placed wrong and doesn’t belong to template.yaml?
- select:
- unique_id: wlanthermo_pitmaster_channel
name: wlanthermo_pitmaster_channel
icon: mdi:pound
state: >
#{{ state_attr('sensor.pitmaster_1_all', 'channel') }} {% if not is_state('sensor.wlanthermo_channel_'~(state_attr('sensor.pitmaster_1_all', 'channel'))~'_all','unavailable') and item.temp < 999 %}{{ state_attr('sensor.wlanthermo_channel_'~(state_attr('sensor.pitmaster_1_all', 'channel'))~'_all', 'name') }}{% else %}(unavailable){% endif %}
availability: >
{{ not is_state('sensor.wlanthermo_pitmaster_value', 'unavailable') }}
select_option:
service: mqtt.publish
data_template:
topic: WLanThermo/MINIV3/set/pitmaster
retain: true
payload: '{{ ''[{"id":0,"channel":''~(state_attr(''select.wlanthermo_pitmaster_channel'',''options'').index(option)+1)+'',"pid":''~state_attr(''sensor.pitmaster_1_all'', ''pid'')+'',"value":''~states(''number.wlanthermo_pitmaster_value'')+'',"set":''+states(''input_number.wlanthermo_pitmaster_temp'')+'',"typ":"''+states(''select.wlanthermo_pitmaster_mode'')+''"}]''}}'
options: |-
[
{% if not is_state('sensor.bbq_thermo', 'unavailable') and (not is_state('sensor.bbq_thermo', 'unknown')) %}
{% for item in state_attr('sensor.bbq_thermo', 'channel') %}
{% if not is_state('sensor.wlanthermo_channel_'~item.number~'_all','unavailable') and item.temp < 999 %}
'#{{ item.number }} {{ item.name }}',
{% else %}
'#{{ item.number }} (unavailable)',
{% endif %}
{% endfor %}
{% else %}
'1', '2', '3', '4', '5', '6', '7', '8'
{% endif %}
]
Hope you can help me sorting the files out.