add NodeMCU example

This commit is contained in:
Dawid Chyrzynski
2021-01-07 23:28:00 +01:00
parent 6983a6d643
commit d01c2f2903
7 changed files with 55 additions and 46 deletions
@@ -11,7 +11,7 @@ byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
HASwitch led("led", false, mqtt);
HASwitch led("led", false, mqtt); // you can use custom name in place of "led"
void onSwitchStateChanged(bool state, HASwitch* s)
{