Hi there.
Actual config:
Thermostat
Idx: thermostat
Rev: 1.38
BHT-002
on tywe3s
MQTT Log:
2024-01-23 15:00:31: New client connected from 192.168.31.109:56204 as thermostat_14189516 (p2, c1, k15, u'ha-home1').
configuration.yaml
mqtt:
climate:
name: Thermostat
unique_id: termostat
device:
configuration_url: http://192.168.31.109/config
manufacturer: Tuya
model: BHT-002
connections: [["mac", " C4:5B:BE:D8:83:CC"]]
temperature_command_topic: thermostat/thermostat/set
temperature_command_template: >
{{ {'targetTemperature':value} | to_json }}
temperature_state_topic: thermostat/thermostat/properties
temperature_state_template: >
{% if value_json is defined and value_json['targetTemperature'] is defined %}
{{ value_json['targetTemperature'] }}
{% endif %}
current_temperature_topic: thermostat/thermostat/properties
current_temperature_template: >
{% if value_json is defined and value_json['temperature'] is defined %}
{{ value_json['temperature'] }}
{% endif %}
mode_state_topic: thermostat/thermostat/properties
mode_state_template: >
{% if value_json is defined and value_json['deviceOn'] is defined %}
{% set deviceOn = value_json['deviceOn'] %}
{% else %}
{% set deviceOn = false %}
{% endif %}
{% if value_json is defined and value_json['schedulesMode'] is defined %}
{% set schedulesMode = value_json['schedulesMode'] %}
{% else %}
{% set schedulesMode = 'off' %}
{% endif %}
{% if deviceOn == true %}
{% if schedulesMode == 'auto' %}
auto
{% else %}
heat
{% endif %}
{% else %}
off
{% endif %}
action_topic: thermostat/thermostat/properties
action_template: >
{% if value_json is defined and value_json['systemMode'] is defined %}
{% set deviceOn = value_json['deviceOn'] %}
{% else %}
{% set deviceOn = false %}
{% endif %}
{% if value_json is defined and value_json['systemMode'] is defined %}
{% set systemMode = value_json['systemMode'] %}
{% else %}
{% set systemMode = 'off' %}
{% endif %}
{% if deviceOn == true %}
{% if systemMode == 'cool' %}
idle
{% elif systemMode == 'heat' %}
heating
{% endif %}
{% else %}
off
{% endif %}
mode_command_topic: thermostat/thermostat/set
mode_command_template: >
{% if value == 'auto' %}
{{ {'deviceOn':true,'schedulesMode':'auto'} | to_json }}
{% endif %}
{% if value == 'heat' %}
{{ {'deviceOn':true,'schedulesMode':'off'} | to_json }}
{% endif %}
{% if value == 'off' %}
{{ {'deviceOn':false,'schedulesMode':'off'} | to_json }}
{% endif %}
Hi there. Actual config: Thermostat Idx: thermostat Rev: 1.38 BHT-002 on tywe3s
MQTT Log: 2024-01-23 15:00:31: New client connected from 192.168.31.109:56204 as thermostat_14189516 (p2, c1, k15, u'ha-home1').
configuration.yaml
mqtt: climate:name: Thermostat unique_id: termostat device: configuration_url: http://192.168.31.109/config manufacturer: Tuya model: BHT-002 connections: [["mac", " C4:5B:BE:D8:83:CC"]] temperature_command_topic: thermostat/thermostat/set temperature_command_template: > {{ {'targetTemperature':value} | to_json }} temperature_state_topic: thermostat/thermostat/properties temperature_state_template: > {% if value_json is defined and value_json['targetTemperature'] is defined %} {{ value_json['targetTemperature'] }} {% endif %}
current_temperature_topic: thermostat/thermostat/properties current_temperature_template: > {% if value_json is defined and value_json['temperature'] is defined %} {{ value_json['temperature'] }} {% endif %}
mode_state_topic: thermostat/thermostat/properties mode_state_template: > {% if value_json is defined and value_json['deviceOn'] is defined %} {% set deviceOn = value_json['deviceOn'] %} {% else %} {% set deviceOn = false %} {% endif %}
action_topic: thermostat/thermostat/properties action_template: > {% if value_json is defined and value_json['systemMode'] is defined %} {% set deviceOn = value_json['deviceOn'] %} {% else %} {% set deviceOn = false %} {% endif %}
mode_command_topic: thermostat/thermostat/set mode_command_template: > {% if value == 'auto' %} {{ {'deviceOn':true,'schedulesMode':'auto'} | to_json }} {% endif %}
modes:
0
But in HA MQTT reports no thermostat or any status.
So whats wrong?