Home Assistant and README

This commit is contained in:
iranl
2024-04-09 23:21:08 +02:00
parent d8adef61c7
commit 7a7b494284
9 changed files with 379 additions and 210 deletions

View File

@@ -592,7 +592,7 @@ void Network::registerMqttReceiver(MqttReceiver* receiver)
void Network::onMqttDataReceivedCallback(const espMqttClientTypes::MessageProperties& properties, const char* topic, const uint8_t* payload, size_t len, size_t index, size_t total)
{
uint8_t value[50] = {0};
uint8_t value[800] = {0};
size_t l = min(len, sizeof(value)-1);
for(int i=0; i<l; i++)
@@ -2169,7 +2169,8 @@ void Network::publishHASSConfigAdditionalOpenerEntities(char *deviceType, const
"",
"config",
String("~") + mqtt_topic_config_action,
{ { "ic", "mdi:led-variant-on" },
{ { "en", "false" },
{ "ic", "mdi:led-variant-on" },
{ "pl_on", "{ \"ledEnabled\": \"1\"}" },
{ "pl_off", "{ \"ledEnabled\": \"0\"}" },
{ "val_tpl", "{{value_json.ledEnabled}}" },
@@ -2197,7 +2198,8 @@ void Network::publishHASSConfigAdditionalOpenerEntities(char *deviceType, const
"",
"config",
String("~") + mqtt_topic_config_action,
{ { "ic", "mdi:radiobox-marked" },
{ { "en", "false" },
{ "ic", "mdi:radiobox-marked" },
{ "pl_on", "{ \"buttonEnabled\": \"1\"}" },
{ "pl_off", "{ \"buttonEnabled\": \"0\"}" },
{ "val_tpl", "{{value_json.buttonEnabled}}" },
@@ -2290,7 +2292,8 @@ void Network::publishHASSConfigAdditionalOpenerEntities(char *deviceType, const
"",
"config",
String("~") + mqtt_topic_config_action,
{ { "ic", "mdi:volume-source" },
{ { "en", "false" },
{ "ic", "mdi:volume-source" },
{ "cmd_tpl", "{ \"soundLevel\": \"{{ value }}\" }" },
{ "val_tpl", "{{value_json.soundLevel}}" },
{ "min", "0" },