Skip to content

Commit

Permalink
Voltage should default to V, not mV (was before before Configuration …
Browse files Browse the repository at this point in the history
…struct)
  • Loading branch information
Johboh committed Mar 16, 2024
1 parent 209c9bc commit c8925aa
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/espidf/actuators/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion examples/espidf/all/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion examples/espidf/sensors/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "Johan Böhlin"
},
"version": "7.0.4",
"version": "7.0.5",
"license": "MIT",
"repository":
{
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=HomeAssistantEntities
version=7.0.4
version=7.0.5
author=Johan Böhlin <[email protected]>
maintainer=Johan Böhlin <[email protected]>
sentence=Library for providing sensors and actuators to Home Assistant using MQTT.
Expand Down
4 changes: 2 additions & 2 deletions src/entities/HaEntityVoltage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c8925aa

Please sign in to comment.