From c8925aac7add58417d8d4f71619f42025a8c2ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20B=C3=B6hlin?= Date: Sat, 16 Mar 2024 16:01:08 +0100 Subject: [PATCH] Voltage should default to V, not mV (was before before Configuration struct) --- README.md | 4 ++-- examples/espidf/actuators/main/idf_component.yml | 2 +- examples/espidf/all/main/idf_component.yml | 2 +- examples/espidf/sensors/main/idf_component.yml | 2 +- idf_component.yml | 2 +- library.json | 2 +- library.properties | 2 +- src/entities/HaEntityVoltage.h | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1bef37a..ad7519a 100644 --- a/README.md +++ b/README.md @@ -36,14 +36,14 @@ Home Assistant has a well defined way of defining sensors and actuators using MQ #### PlatformIO (Arduino or ESP-IDF): Add the following to `libs_deps`: ``` - Johboh/HomeAssistantEntities@^7.0.4 + Johboh/HomeAssistantEntities@^7.0.5 ``` #### Espressif IoT Development Framework: In your existing `idf_component.yml` or in a new `idf_component.yml` next to your main component: ``` dependencies: johboh/HomeAssistantEntities: - version: ">=7.0.4" + version: ">=7.0.5" ``` ### Examples diff --git a/examples/espidf/actuators/main/idf_component.yml b/examples/espidf/actuators/main/idf_component.yml index a56d6fc..abb8ad9 100644 --- a/examples/espidf/actuators/main/idf_component.yml +++ b/examples/espidf/actuators/main/idf_component.yml @@ -1,6 +1,6 @@ dependencies: johboh/HomeAssistantEntities: - #version: ">=7.0.4" + #version: ">=7.0.5" # Remove path and enable version to use HomeAssistantEntities from repository path: ../../../../ johboh/MQTTRemote: diff --git a/examples/espidf/all/main/idf_component.yml b/examples/espidf/all/main/idf_component.yml index a56d6fc..abb8ad9 100644 --- a/examples/espidf/all/main/idf_component.yml +++ b/examples/espidf/all/main/idf_component.yml @@ -1,6 +1,6 @@ dependencies: johboh/HomeAssistantEntities: - #version: ">=7.0.4" + #version: ">=7.0.5" # Remove path and enable version to use HomeAssistantEntities from repository path: ../../../../ johboh/MQTTRemote: diff --git a/examples/espidf/sensors/main/idf_component.yml b/examples/espidf/sensors/main/idf_component.yml index a56d6fc..abb8ad9 100644 --- a/examples/espidf/sensors/main/idf_component.yml +++ b/examples/espidf/sensors/main/idf_component.yml @@ -1,6 +1,6 @@ dependencies: johboh/HomeAssistantEntities: - #version: ">=7.0.4" + #version: ">=7.0.5" # Remove path and enable version to use HomeAssistantEntities from repository path: ../../../../ johboh/MQTTRemote: diff --git a/idf_component.yml b/idf_component.yml index b6c2b08..a987d58 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,4 +1,4 @@ -version: "7.0.4" +version: "7.0.5" description: Library for providing sensors and actuators to Home Assistant using MQTT. url: https://github.com/Johboh/HomeAssistantEntities dependencies: diff --git a/library.json b/library.json index 018e672..e28560f 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ { "name": "Johan Böhlin" }, - "version": "7.0.4", + "version": "7.0.5", "license": "MIT", "repository": { diff --git a/library.properties b/library.properties index 5018155..23a5757 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=HomeAssistantEntities -version=7.0.4 +version=7.0.5 author=Johan Böhlin maintainer=Johan Böhlin sentence=Library for providing sensors and actuators to Home Assistant using MQTT. diff --git a/src/entities/HaEntityVoltage.h b/src/entities/HaEntityVoltage.h index 549832d..8410389 100644 --- a/src/entities/HaEntityVoltage.h +++ b/src/entities/HaEntityVoltage.h @@ -21,7 +21,7 @@ class HaEntityVoltage : public HaEntity { /** * @brief the unit of measurement reported for this sensor. Make sure that the value you publish is of this unit. */ - Unit unit = Unit::mV; + Unit unit = Unit::V; /** * In Home Assistant, trigger events even if the sensor's state hasn't changed. Useful if you want @@ -31,7 +31,7 @@ class HaEntityVoltage : public HaEntity { bool force_update = false; }; - inline static Configuration _default = {.unit = Unit::mV, .force_update = false}; + inline static Configuration _default = {.unit = Unit::V, .force_update = false}; /** * @brief Construct a new Ha Entity Voltage object