From ad312c04144d17e6d38de34f1b44503480852739 Mon Sep 17 00:00:00 2001 From: Federico Leoni Date: Tue, 24 Dec 2019 13:21:56 -0300 Subject: [PATCH 1/2] Update xdrv_12_home_assistant.ino --- tasmota/xdrv_12_home_assistant.ino | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasmota/xdrv_12_home_assistant.ino b/tasmota/xdrv_12_home_assistant.ino index 274b5f42a..50ac66761 100644 --- a/tasmota/xdrv_12_home_assistant.ino +++ b/tasmota/xdrv_12_home_assistant.ino @@ -100,6 +100,12 @@ const char HASS_DISCOVER_SENSOR_HUM[] PROGMEM = "\"val_tpl\":\"{{value_json['%s'].Humidity}}\"," // "SI7021-14":{"Temperature":null,"Humidity":null} -> {{ value_json['SI7021-14'].Humidity }} "\"dev_cla\":\"humidity\""; // humidity +const char HASS_DISCOVER_SENSOR_MOIST[] PROGMEM = + ",\"unit_of_meas\":\"%%\"," // % + "\"val_tpl\":\"{{value_json['%s'].Moisture}}\"," // "ANALOG":{"Moisture":78} -> {{ value_json['ANALOG'].Moisture }} + "\"dev_cla\":\"humidity\"," // humidity + "\"ic\":\"mdi:cup-water\""; // cup-water icon + const char HASS_DISCOVER_SENSOR_PRESS[] PROGMEM = ",\"unit_of_meas\":\"%s\"," // PressureUnit() setting "\"val_tpl\":\"{{value_json['%s'].%s}}\"," // "BME280":{"Temperature":19.7,"Humidity":27.8,"Pressure":990.1} -> {{ value_json['BME280'].Pressure }} @@ -473,6 +479,8 @@ void HAssAnnounceSensor(const char* sensorname, const char* subsensortype) TryResponseAppend_P(HASS_DISCOVER_SENSOR_AMPERE, sensorname, subsensortype); } else if (!strcmp_P(subsensortype, PSTR(D_JSON_ILLUMINANCE))){ TryResponseAppend_P(HASS_DISCOVER_SENSOR_ILLUMINANCE, sensorname, subsensortype); + } else if (!strcmp_P(subsensortype, PSTR(D_JSON_MOISTURE))){ + TryResponseAppend_P(HASS_DISCOVER_SENSOR_MOIST, sensorname, subsensortype); } else { if (is_sensor){ TryResponseAppend_P(PSTR(",\"unit_of_meas\":\" \"")); // " " As unit of measurement to get a value graph (not available for binary sensors) From 8cf7c6fbc212929f397c202af0009369ebe6d249 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 24 Dec 2019 17:25:21 +0100 Subject: [PATCH 2/2] Bump version to 8.0.0.3 --- RELEASENOTES.md | 2 +- tasmota/CHANGELOG.md | 4 ++++ tasmota/tasmota_version.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 6be1dfa9f..c7566764e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -50,7 +50,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c ## Changelog -### Version 8.0.0.2 +### Version 8.0.0.3 - Change Settings text handling allowing variable length text within a total text pool of 699 characters - Change Smoother ``Fade`` using 100Hz instead of 20Hz animation (#7179) diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index 0c12ed15c..b351cb091 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -1,5 +1,9 @@ ## Unreleased (development) +### 8.0.0.3 20191224 + +- Version bump due to internal Settings change + ### 8.0.0.2 20191223 - Changed Settings variable namings diff --git a/tasmota/tasmota_version.h b/tasmota/tasmota_version.h index e69d4fd39..57329bcd1 100644 --- a/tasmota/tasmota_version.h +++ b/tasmota/tasmota_version.h @@ -20,7 +20,7 @@ #ifndef _TASMOTA_VERSION_H_ #define _TASMOTA_VERSION_H_ -const uint32_t VERSION = 0x08000002; +const uint32_t VERSION = 0x08000003; // Lowest compatible version const uint32_t VERSION_COMPATIBLE = 0x07010006;