Add neato boundary name to state if it exists (#29915)

* Add boundary name to state if it exists

If the robot is cleaning a pre defined area with a name, add the name to the state-attribute.

* Reformat patch

* Removing whitespace

* Even more formatting 

That black did not catch on first run...
This commit is contained in:
Olen 2020-01-09 09:42:18 +01:00 committed by Martin Hjelmare
parent 6b7be35f4a
commit 290043aed6

View file

@ -208,6 +208,13 @@ class NeatoConnectedVacuum(StateVacuumDevice):
+ " "
+ ACTION.get(self._state["action"])
)
if (
"boundary" in self._state["cleaning"]
and "name" in self._state["cleaning"]["boundary"]
):
self._status_state += (
" " + self._state["cleaning"]["boundary"]["name"]
)
else:
self._status_state = robot_alert
elif self._state["state"] == 3: