Closed northpower25 closed 4 years ago
This can be done by exposing the LAST_ERROR_CODE of the mower API. I have implemented this already in my local system:
@osks would you like a PR or is there another solution that you prefer?
A PR would be great!
Either use ATTR_LAST_ERROR (which is used in switch.py) or replace both with a new ATTR_LAST_ERROR_CODE. I think I would prefer the later, because in the Gardena API it's called lastErrorCode.
Would it not be nice to also have the date and time for when the last error occured? This would perhaps best be implemented with support in py-smart-gardena though, but could alternatively be set when HA handles the update that gets the error.
https://github.com/osks/hass-gardena-smart-system/pull/14
This PR adds the mower error code as an attribute to the mower entity as shown above. It is based on the API property ATTR_LAST_ERROR_CODE.
The PR does not change switch.py and does not add any timestamp for the last error. (I am not yet capable of changing external libs like py-smart-gardena. Bear with me. :)
At first a great integration for the husquana/gardena smart system. Thanks for this! In addition to the great Integration it would be greate if errorcodes (like broken cables etc.) from the mower are shown as seperate sensor or as attribut of the Sileno device.