From 290043aed6f6e83b4bf4b1b3321b3ff7d16e9ce0 Mon Sep 17 00:00:00 2001 From: Olen Date: Thu, 9 Jan 2020 09:42:18 +0100 Subject: [PATCH] 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... --- homeassistant/components/neato/vacuum.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/homeassistant/components/neato/vacuum.py b/homeassistant/components/neato/vacuum.py index d8a3e4ded45..92e1539da4f 100644 --- a/homeassistant/components/neato/vacuum.py +++ b/homeassistant/components/neato/vacuum.py @@ -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: