Change source of device_info (#29570)
This commit is contained in:
parent
d0c7db548f
commit
c399fe2837
1 changed files with 4 additions and 5 deletions
|
@ -165,7 +165,7 @@ class NeatoConnectedVacuum(StateVacuumDevice):
|
||||||
_LOGGER.debug("Running Neato Vacuums update")
|
_LOGGER.debug("Running Neato Vacuums update")
|
||||||
try:
|
try:
|
||||||
if self._robot_stats is None:
|
if self._robot_stats is None:
|
||||||
self._robot_stats = self.robot.get_robot_info().json()
|
self._robot_stats = self.robot.get_general_info().json().get("data")
|
||||||
except NeatoRobotException:
|
except NeatoRobotException:
|
||||||
_LOGGER.warning("Couldn't fetch robot information of %s", self._name)
|
_LOGGER.warning("Couldn't fetch robot information of %s", self._name)
|
||||||
|
|
||||||
|
@ -319,10 +319,9 @@ class NeatoConnectedVacuum(StateVacuumDevice):
|
||||||
"""Device info for neato robot."""
|
"""Device info for neato robot."""
|
||||||
info = {"identifiers": {(NEATO_DOMAIN, self._robot_serial)}, "name": self._name}
|
info = {"identifiers": {(NEATO_DOMAIN, self._robot_serial)}, "name": self._name}
|
||||||
if self._robot_stats:
|
if self._robot_stats:
|
||||||
info["manufacturer"] = self._robot_stats["data"]["mfg_name"]
|
info["manufacturer"] = self._robot_stats["battery"]["vendor"]
|
||||||
info["model"] = self._robot_stats["data"]["modelName"]
|
info["model"] = self._robot_stats["model"]
|
||||||
if self._state:
|
info["sw_version"] = self._robot_stats["firmware"]
|
||||||
info["sw_version"] = self._state["meta"]["firmware"]
|
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
"""Start cleaning or resume cleaning."""
|
"""Start cleaning or resume cleaning."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue