convert lock state to string

This commit is contained in:
technyon
2022-03-25 20:57:40 +01:00
parent 0c03a64a86
commit 66e0239589
4 changed files with 51 additions and 7 deletions

View File

@@ -124,9 +124,7 @@ void Network::onMqttDataReceived(char *&topic, byte *&payload, unsigned int &len
}
}
void Network::publishKeyTurnerState(const KeyTurnerState &state)
void Network::publishKeyTurnerState(const char* state)
{
char cstr[10];
itoa((int)state.lockState, cstr, 10);
_mqttClient.publish(mqtt_topc_lockstate, cstr);
_mqttClient.publish(mqtt_topc_lockstate, state);
}