clang format all of this
This commit is contained in:
@@ -52,9 +52,9 @@ void HomeAssistant::event_handler(struct lws* wsi, const enum lws_callback_reaso
|
||||
|
||||
if (ha_type == "event") {
|
||||
json = json["event"];
|
||||
if(json.contains("a"))
|
||||
if (json.contains("a"))
|
||||
state = std::stof(json["a"][entity]["s"].get<std::string>());
|
||||
if(json.contains("c"))
|
||||
if (json.contains("c"))
|
||||
state = std::stof(json["c"][entity]["+"]["s"].get<std::string>());
|
||||
break;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ void HomeAssistant::event_handler(struct lws* wsi, const enum lws_callback_reaso
|
||||
|
||||
case LWS_CALLBACK_CLIENT_WRITEABLE: {
|
||||
/* skip whole callback if there's no tx to send */
|
||||
if (! tx.empty()) {
|
||||
if (!tx.empty()) {
|
||||
const size_t msgLen = LWS_PRE + tx.size();
|
||||
auto* buf = static_cast<unsigned char*>(malloc(msgLen));
|
||||
if (buf) {
|
||||
|
||||
Reference in New Issue
Block a user