mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 11:37:27 +01:00
Add config for current temperature precision (#7699)
This commit is contained in:
parent
d3563e4e97
commit
e85157db4b
@ -71,8 +71,10 @@ void MQTTClimateComponent::send_discovery(JsonObject root, mqtt::SendDiscoveryCo
|
|||||||
root[MQTT_MIN_TEMP] = traits.get_visual_min_temperature();
|
root[MQTT_MIN_TEMP] = traits.get_visual_min_temperature();
|
||||||
// max_temp
|
// max_temp
|
||||||
root[MQTT_MAX_TEMP] = traits.get_visual_max_temperature();
|
root[MQTT_MAX_TEMP] = traits.get_visual_max_temperature();
|
||||||
// temp_step
|
// target_temp_step
|
||||||
root["temp_step"] = traits.get_visual_target_temperature_step();
|
root[MQTT_TARGET_TEMPERATURE_STEP] = traits.get_visual_target_temperature_step();
|
||||||
|
// current_temp_step
|
||||||
|
root[MQTT_CURRENT_TEMPERATURE_STEP] = traits.get_visual_current_temperature_step();
|
||||||
// temperature units are always coerced to Celsius internally
|
// temperature units are always coerced to Celsius internally
|
||||||
root[MQTT_TEMPERATURE_UNIT] = "C";
|
root[MQTT_TEMPERATURE_UNIT] = "C";
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ constexpr const char *const MQTT_COMMAND_TOPIC = "cmd_t";
|
|||||||
constexpr const char *const MQTT_CONFIGURATION_URL = "cu";
|
constexpr const char *const MQTT_CONFIGURATION_URL = "cu";
|
||||||
constexpr const char *const MQTT_CURRENT_HUMIDITY_TEMPLATE = "curr_hum_tpl";
|
constexpr const char *const MQTT_CURRENT_HUMIDITY_TEMPLATE = "curr_hum_tpl";
|
||||||
constexpr const char *const MQTT_CURRENT_HUMIDITY_TOPIC = "curr_hum_t";
|
constexpr const char *const MQTT_CURRENT_HUMIDITY_TOPIC = "curr_hum_t";
|
||||||
|
constexpr const char *const MQTT_CURRENT_TEMPERATURE_STEP = "precision";
|
||||||
constexpr const char *const MQTT_CURRENT_TEMPERATURE_TEMPLATE = "curr_temp_tpl";
|
constexpr const char *const MQTT_CURRENT_TEMPERATURE_TEMPLATE = "curr_temp_tpl";
|
||||||
constexpr const char *const MQTT_CURRENT_TEMPERATURE_TOPIC = "curr_temp_t";
|
constexpr const char *const MQTT_CURRENT_TEMPERATURE_TOPIC = "curr_temp_t";
|
||||||
constexpr const char *const MQTT_DEVICE = "dev";
|
constexpr const char *const MQTT_DEVICE = "dev";
|
||||||
@ -232,6 +233,7 @@ constexpr const char *const MQTT_TARGET_HUMIDITY_COMMAND_TEMPLATE = "hum_cmd_tpl
|
|||||||
constexpr const char *const MQTT_TARGET_HUMIDITY_COMMAND_TOPIC = "hum_cmd_t";
|
constexpr const char *const MQTT_TARGET_HUMIDITY_COMMAND_TOPIC = "hum_cmd_t";
|
||||||
constexpr const char *const MQTT_TARGET_HUMIDITY_STATE_TEMPLATE = "hum_state_tpl";
|
constexpr const char *const MQTT_TARGET_HUMIDITY_STATE_TEMPLATE = "hum_state_tpl";
|
||||||
constexpr const char *const MQTT_TARGET_HUMIDITY_STATE_TOPIC = "hum_stat_t";
|
constexpr const char *const MQTT_TARGET_HUMIDITY_STATE_TOPIC = "hum_stat_t";
|
||||||
|
constexpr const char *const MQTT_TARGET_TEMPERATURE_STEP = "temp_step";
|
||||||
constexpr const char *const MQTT_TEMPERATURE_COMMAND_TEMPLATE = "temp_cmd_tpl";
|
constexpr const char *const MQTT_TEMPERATURE_COMMAND_TEMPLATE = "temp_cmd_tpl";
|
||||||
constexpr const char *const MQTT_TEMPERATURE_COMMAND_TOPIC = "temp_cmd_t";
|
constexpr const char *const MQTT_TEMPERATURE_COMMAND_TOPIC = "temp_cmd_t";
|
||||||
constexpr const char *const MQTT_TEMPERATURE_HIGH_COMMAND_TEMPLATE = "temp_hi_cmd_tpl";
|
constexpr const char *const MQTT_TEMPERATURE_HIGH_COMMAND_TEMPLATE = "temp_hi_cmd_tpl";
|
||||||
@ -313,6 +315,7 @@ constexpr const char *const MQTT_COMMAND_TOPIC = "command_topic";
|
|||||||
constexpr const char *const MQTT_CONFIGURATION_URL = "configuration_url";
|
constexpr const char *const MQTT_CONFIGURATION_URL = "configuration_url";
|
||||||
constexpr const char *const MQTT_CURRENT_HUMIDITY_TEMPLATE = "current_humidity_template";
|
constexpr const char *const MQTT_CURRENT_HUMIDITY_TEMPLATE = "current_humidity_template";
|
||||||
constexpr const char *const MQTT_CURRENT_HUMIDITY_TOPIC = "current_humidity_topic";
|
constexpr const char *const MQTT_CURRENT_HUMIDITY_TOPIC = "current_humidity_topic";
|
||||||
|
constexpr const char *const MQTT_CURRENT_TEMPERATURE_STEP = "precision";
|
||||||
constexpr const char *const MQTT_CURRENT_TEMPERATURE_TEMPLATE = "current_temperature_template";
|
constexpr const char *const MQTT_CURRENT_TEMPERATURE_TEMPLATE = "current_temperature_template";
|
||||||
constexpr const char *const MQTT_CURRENT_TEMPERATURE_TOPIC = "current_temperature_topic";
|
constexpr const char *const MQTT_CURRENT_TEMPERATURE_TOPIC = "current_temperature_topic";
|
||||||
constexpr const char *const MQTT_DEVICE = "device";
|
constexpr const char *const MQTT_DEVICE = "device";
|
||||||
@ -494,6 +497,7 @@ constexpr const char *const MQTT_TARGET_HUMIDITY_COMMAND_TEMPLATE = "target_humi
|
|||||||
constexpr const char *const MQTT_TARGET_HUMIDITY_COMMAND_TOPIC = "target_humidity_command_topic";
|
constexpr const char *const MQTT_TARGET_HUMIDITY_COMMAND_TOPIC = "target_humidity_command_topic";
|
||||||
constexpr const char *const MQTT_TARGET_HUMIDITY_STATE_TEMPLATE = "target_humidity_state_template";
|
constexpr const char *const MQTT_TARGET_HUMIDITY_STATE_TEMPLATE = "target_humidity_state_template";
|
||||||
constexpr const char *const MQTT_TARGET_HUMIDITY_STATE_TOPIC = "target_humidity_state_topic";
|
constexpr const char *const MQTT_TARGET_HUMIDITY_STATE_TOPIC = "target_humidity_state_topic";
|
||||||
|
constexpr const char *const MQTT_TARGET_TEMPERATURE_STEP = "temp_step";
|
||||||
constexpr const char *const MQTT_TEMPERATURE_COMMAND_TEMPLATE = "temperature_command_template";
|
constexpr const char *const MQTT_TEMPERATURE_COMMAND_TEMPLATE = "temperature_command_template";
|
||||||
constexpr const char *const MQTT_TEMPERATURE_COMMAND_TOPIC = "temperature_command_topic";
|
constexpr const char *const MQTT_TEMPERATURE_COMMAND_TOPIC = "temperature_command_topic";
|
||||||
constexpr const char *const MQTT_TEMPERATURE_HIGH_COMMAND_TEMPLATE = "temperature_high_command_template";
|
constexpr const char *const MQTT_TEMPERATURE_HIGH_COMMAND_TEMPLATE = "temperature_high_command_template";
|
||||||
|
@ -200,6 +200,10 @@ climate:
|
|||||||
fan_only_cooling: true
|
fan_only_cooling: true
|
||||||
fan_with_cooling: true
|
fan_with_cooling: true
|
||||||
fan_with_heating: true
|
fan_with_heating: true
|
||||||
|
visual:
|
||||||
|
temperature_step:
|
||||||
|
target_temperature: 0.1
|
||||||
|
current_temperature: 0.1
|
||||||
|
|
||||||
cover:
|
cover:
|
||||||
- platform: template
|
- platform: template
|
||||||
|
Loading…
Reference in New Issue
Block a user