Merge branch 'v1.13.0'
This commit is contained in:
commit
7150dc08c9
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
|
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
|
||||||
"name": "ha-mqtt",
|
"name": "ha-mqtt",
|
||||||
"version": "1.12.0",
|
"version": "1.13.0",
|
||||||
"description": "Home Assistant classes for integration with MQTT auto discovery",
|
"description": "Home Assistant classes for integration with MQTT auto discovery",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -42,8 +42,7 @@ namespace HaESP {
|
|||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
Builder<T>& heapStats(Builder<T>& builder) {
|
Builder<T>& heapStats(Builder<T>& builder) {
|
||||||
auto heap = new Sensor{ "Heap fragmentation", "heap_fragmentation" };
|
builder.addDiagnostic(Builder<Sensor>::instance(new Sensor{ "Heap fragmentation", "heap_fragmentation" })
|
||||||
builder.addDiagnostic(Builder<Sensor>::instance(heap)
|
|
||||||
.withUnitMeasure("%")
|
.withUnitMeasure("%")
|
||||||
.withPrecision(0)
|
.withPrecision(0)
|
||||||
.withValueTemplate("{{ value_json.fragmentation }}")
|
.withValueTemplate("{{ value_json.fragmentation }}")
|
||||||
|
|||||||
5
src/ha.h
5
src/ha.h
@ -496,6 +496,11 @@ namespace Ha {
|
|||||||
return factoryBuilder(*this);
|
return factoryBuilder(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Callable>
|
||||||
|
Builder& addPreconfigured(Callable&& factoryBuilder) {
|
||||||
|
return factoryBuilder(*this);
|
||||||
|
}
|
||||||
|
|
||||||
Builder& addConfiguration(Component* c) {
|
Builder& addConfiguration(Component* c) {
|
||||||
c->entityCategory = "config";
|
c->entityCategory = "config";
|
||||||
return addSecondary(c);
|
return addSecondary(c);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user