mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-17 09:02:11 +00:00
Modifications to make price sensors work in HA
This commit is contained in:
parent
e7c25fafda
commit
57e6d0fbe3
@ -248,6 +248,7 @@ bool HomeAssistantMqttHandler::publishSystem(HwTools* hw, EntsoeApi* eapi, Energ
|
||||
uid.replace(".", "");
|
||||
uid.replace("[", "");
|
||||
uid.replace("]", "");
|
||||
uid.replace("'", "");
|
||||
String uom = String(sensor.uom);
|
||||
if(strncmp(sensor.devcl, "monetary", 8) == 0) {
|
||||
if(eapi == NULL) continue;
|
||||
|
||||
@ -32,18 +32,18 @@ HomeAssistantSensor HA_SENSORS[HA_SENSOR_COUNT] PROGMEM = {
|
||||
{"Accumulated active export", "/energy", "tPO", "kWh", "energy", "\"total_increasing\""},
|
||||
{"Accumulated reactive import","/energy", "tQI", "kVArh","energy", "\"total_increasing\""},
|
||||
{"Accumulated reactive export","/energy", "tQO", "kVArh","energy", "\"total_increasing\""},
|
||||
{"Price current hour", "/prices", "prices.0", "", "monetary", ""},
|
||||
{"Price next hour", "/prices", "prices.1", "", "monetary", ""},
|
||||
{"Price in two hour", "/prices", "prices.2", "", "monetary", ""},
|
||||
{"Price in three hour", "/prices", "prices.3", "", "monetary", ""},
|
||||
{"Price in four hour", "/prices", "prices.4", "", "monetary", ""},
|
||||
{"Price in five hour", "/prices", "prices.5", "", "monetary", ""},
|
||||
{"Price in six hour", "/prices", "prices.6", "", "monetary", ""},
|
||||
{"Price in seven hour", "/prices", "prices.7", "", "monetary", ""},
|
||||
{"Price in eight hour", "/prices", "prices.8", "", "monetary", ""},
|
||||
{"Price in nine hour", "/prices", "prices.9", "", "monetary", ""},
|
||||
{"Price in ten hour", "/prices", "prices.10", "", "monetary", ""},
|
||||
{"Price in eleven hour", "/prices", "prices.11", "", "monetary", ""},
|
||||
{"Price current hour", "/prices", "prices['0']", "", "monetary", ""},
|
||||
{"Price next hour", "/prices", "prices['1']", "", "monetary", ""},
|
||||
{"Price in two hour", "/prices", "prices['2']", "", "monetary", ""},
|
||||
{"Price in three hour", "/prices", "prices['3']", "", "monetary", ""},
|
||||
{"Price in four hour", "/prices", "prices['4']", "", "monetary", ""},
|
||||
{"Price in five hour", "/prices", "prices['5']", "", "monetary", ""},
|
||||
{"Price in six hour", "/prices", "prices['6']", "", "monetary", ""},
|
||||
{"Price in seven hour", "/prices", "prices['7']", "", "monetary", ""},
|
||||
{"Price in eight hour", "/prices", "prices['8']", "", "monetary", ""},
|
||||
{"Price in nine hour", "/prices", "prices['9']", "", "monetary", ""},
|
||||
{"Price in ten hour", "/prices", "prices['10']", "", "monetary", ""},
|
||||
{"Price in eleven hour", "/prices", "prices['11']", "", "monetary", ""},
|
||||
{"Minimum price ahead", "/prices", "prices.min", "", "monetary", ""},
|
||||
{"Maximum price ahead", "/prices", "prices.max", "", "monetary", ""},
|
||||
{"Cheapest 1hr period ahead", "/prices", "prices.cheapest1hr","", "timestamp", ""},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user