Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Add serial number
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas55555 authored Feb 29, 2024
1 parent 37fc40c commit dfac54e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/husqvarna_automower/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, coordinator, idx) -> None:
self.mower_id = self.mower["id"]
self.mower_name = mower_attributes["system"]["name"]
self.model_name = mower_attributes["system"]["model"]

self.serial = mower_attributes["system"]["serialNumber"]
self._available = self.get_mower_attributes()["metadata"]["connected"]

def get_mower_attributes(self) -> dict:
Expand Down Expand Up @@ -67,6 +67,7 @@ def device_info(self) -> DeviceInfo:
model=self.model_name,
configuration_url=HUSQVARNA_URL,
suggested_area="Garden",
serial_number=self.serial
)

@property
Expand Down

0 comments on commit dfac54e

Please sign in to comment.