Fixes
This commit is contained in:
@@ -740,7 +740,7 @@ void Network::publishHASSConfig(char* deviceType, const char* baseTopic, char* n
|
|||||||
json["pl_lock"] = lockAction;
|
json["pl_lock"] = lockAction;
|
||||||
json["pl_unlk"] = unlockAction;
|
json["pl_unlk"] = unlockAction;
|
||||||
json["pl_open"] = openAction;
|
json["pl_open"] = openAction;
|
||||||
json["stat_t"] = String("~") + mqtt_topic_lock_binary_state;
|
json["stat_t"] = String("~") + mqtt_topic_lock_state;
|
||||||
json["stat_jammed"] = "jammed";
|
json["stat_jammed"] = "jammed";
|
||||||
json["stat_locked"] = "locked";
|
json["stat_locked"] = "locked";
|
||||||
json["stat_locking"] = "locking";
|
json["stat_locking"] = "locking";
|
||||||
|
|||||||
@@ -281,29 +281,16 @@ void NetworkLock::publishBinaryState(NukiLock::LockState lockState)
|
|||||||
switch(lockState)
|
switch(lockState)
|
||||||
{
|
{
|
||||||
case NukiLock::LockState::Locked:
|
case NukiLock::LockState::Locked:
|
||||||
|
case NukiLock::LockState::Locking:
|
||||||
publishString(mqtt_topic_lock_binary_state, "locked");
|
publishString(mqtt_topic_lock_binary_state, "locked");
|
||||||
break;
|
break;
|
||||||
case NukiLock::LockState::Locking:
|
|
||||||
publishString(mqtt_topic_lock_binary_state, "locking");
|
|
||||||
break;
|
|
||||||
case NukiLock::LockState::Unlocked:
|
case NukiLock::LockState::Unlocked:
|
||||||
publishString(mqtt_topic_lock_binary_state, "unlocked");
|
|
||||||
break;
|
|
||||||
case NukiLock::LockState::Unlocking:
|
case NukiLock::LockState::Unlocking:
|
||||||
publishString(mqtt_topic_lock_binary_state, "unlocking");
|
|
||||||
break;
|
|
||||||
case NukiLock::LockState::Unlatched:
|
case NukiLock::LockState::Unlatched:
|
||||||
publishString(mqtt_topic_lock_binary_state, "unlatched");
|
|
||||||
break;
|
|
||||||
case NukiLock::LockState::Unlatching:
|
case NukiLock::LockState::Unlatching:
|
||||||
publishString(mqtt_topic_lock_binary_state, "unlatching");
|
|
||||||
break;
|
|
||||||
case NukiLock::LockState::UnlockedLnga:
|
case NukiLock::LockState::UnlockedLnga:
|
||||||
publishString(mqtt_topic_lock_binary_state, "unlocked");
|
publishString(mqtt_topic_lock_binary_state, "unlocked");
|
||||||
break;
|
break;
|
||||||
case NukiLock::LockState::MotorBlocked:
|
|
||||||
publishString(mqtt_topic_lock_binary_state, "jammed");
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -274,13 +274,9 @@ void NetworkOpener::publishBinaryState(NukiOpener::OpenerState lockState)
|
|||||||
publishString(mqtt_topic_lock_binary_state, "locked");
|
publishString(mqtt_topic_lock_binary_state, "locked");
|
||||||
break;
|
break;
|
||||||
case NukiOpener::LockState::RTOactive:
|
case NukiOpener::LockState::RTOactive:
|
||||||
publishString(mqtt_topic_lock_binary_state, "unlocked");
|
|
||||||
break;
|
|
||||||
case NukiOpener::LockState::Open:
|
case NukiOpener::LockState::Open:
|
||||||
publishString(mqtt_topic_lock_binary_state, "unlocked");
|
|
||||||
break;
|
|
||||||
case NukiOpener::LockState::Opening:
|
case NukiOpener::LockState::Opening:
|
||||||
publishString(mqtt_topic_lock_binary_state, "unlocking");
|
publishString(mqtt_topic_lock_binary_state, "unlocked");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user