diff --git a/custom_components/sunseeker/const.py b/custom_components/sunseeker/const.py index e6f66bc..681a02d 100644 --- a/custom_components/sunseeker/const.py +++ b/custom_components/sunseeker/const.py @@ -10,6 +10,7 @@ SUNSEEKER_GOING_HOME = "On the way home" SUNSEEKER_CHARGING = "Charging" SUNSEEKER_MOWING_BORDER = "Mowing border" +SUNSEEKER_UNKNOWN_4 = "Unknown4" SUNSEEKER_UNKNOWN = "Unknown" SUNSEEKER_DRY = "Dry" diff --git a/custom_components/sunseeker/lawn_mower.py b/custom_components/sunseeker/lawn_mower.py index 1adcfc6..aec5914 100644 --- a/custom_components/sunseeker/lawn_mower.py +++ b/custom_components/sunseeker/lawn_mower.py @@ -22,6 +22,7 @@ SUNSEEKER_MOWING_BORDER, SUNSEEKER_STANDBY, SUNSEEKER_UNKNOWN, + SUNSEEKER_UNKNOWN_4, ) from .entity import SunseekerEntity @@ -101,9 +102,9 @@ def state(self) -> str | None: elif ival == 3: val = SUNSEEKER_CHARGING elif ival == 4: - val = SUNSEEKER_MOWING_BORDER + val = SUNSEEKER_UNKNOWN_4 elif ival == 7: - val = SUNSEEKER_UNKNOWN + val = SUNSEEKER_MOWING_BORDER else: val = SUNSEEKER_UNKNOWN return val diff --git a/custom_components/sunseeker/manifest.json b/custom_components/sunseeker/manifest.json index 5cbdf41..a6b9c84 100644 --- a/custom_components/sunseeker/manifest.json +++ b/custom_components/sunseeker/manifest.json @@ -8,5 +8,5 @@ "integration_type": "device", "iot_class": "cloud_push", "config_flow": true, - "version": "1.0.5" + "version": "1.0.6" } \ No newline at end of file diff --git a/custom_components/sunseeker/sensor.py b/custom_components/sunseeker/sensor.py index 3562d74..c6dfea8 100644 --- a/custom_components/sunseeker/sensor.py +++ b/custom_components/sunseeker/sensor.py @@ -16,6 +16,7 @@ SUNSEEKER_MOWING_BORDER, SUNSEEKER_STANDBY, SUNSEEKER_UNKNOWN, + SUNSEEKER_UNKNOWN_4, SUNSEEKER_WET, ) from .entity import SunseekerEntity @@ -344,9 +345,9 @@ def state(self): # noqa: C901 elif ival == 3: val = SUNSEEKER_CHARGING elif ival == 4: - val = SUNSEEKER_MOWING_BORDER + val = SUNSEEKER_UNKNOWN_4 elif ival == 7: - val = SUNSEEKER_UNKNOWN + val = SUNSEEKER_MOWING_BORDER else: val = SUNSEEKER_UNKNOWN elif self._valuepair == "wifi_lv": diff --git a/custom_components/sunseeker/sunseeker.py b/custom_components/sunseeker/sunseeker.py index 7937479..ca8f16b 100644 --- a/custom_components/sunseeker/sunseeker.py +++ b/custom_components/sunseeker/sunseeker.py @@ -63,7 +63,8 @@ def InitValues(self) -> None: self.rain_en = self.devicedata["data"].get("rainFlag") self.rain_delay_set = int(self.devicedata["data"].get("rainDelayDuration")) self.rain_delay_left = self.devicedata["data"].get("rainDelayLeft") - self.deviceOnlineFlag = self.devicedata["data"].get("onlineFlag") + if self.devicedata["data"].get("onlineFlag"): + self.deviceOnlineFlag = '{"online":"1"}' self.zoneOpenFlag = self.settings["data"].get("zoneOpenFlag") self.mul_en = self.settings["data"].get("zoneOpenFlag") self.mul_auto = self.settings["data"].get("zoneAutomaticFlag") diff --git a/custom_components/sunseeker/text.py b/custom_components/sunseeker/text.py index a49fd2c..7e7d197 100644 --- a/custom_components/sunseeker/text.py +++ b/custom_components/sunseeker/text.py @@ -106,7 +106,7 @@ async def async_set_value(self, value: str) -> None: start = value[0:5] stop = value[8:13] trim = False - if "Trim" or "trim" in value: + if "Trim" in value or "trim" in value: trim = True retval2 = { diff --git a/custom_components/sunseeker/translations/da.json b/custom_components/sunseeker/translations/da.json index 6cfcf58..05cf53d 100644 --- a/custom_components/sunseeker/translations/da.json +++ b/custom_components/sunseeker/translations/da.json @@ -30,7 +30,8 @@ "On the way home": "På vej hjem", "Charging": "Oplader", "Mowing border": "Klipper kant", - "Unknown": "Ukendt" + "Unknown": "Ukendt", + "Unknown4": "Mode 4" } }, "sunseeker_battery": { @@ -114,7 +115,9 @@ "On the way home": "På vej hjem", "Charging": "Oplader", "Mowing border": "Klipper kant", - "Unknown": "Ukendt" + "Unknown": "Ukendt", + "Unknown4": "Mode 4" + } } }, diff --git a/custom_components/sunseeker/translations/en.json b/custom_components/sunseeker/translations/en.json index c1c0400..2085aac 100644 --- a/custom_components/sunseeker/translations/en.json +++ b/custom_components/sunseeker/translations/en.json @@ -30,7 +30,8 @@ "On the way home": "Going home", "Charging": "Charging", "Mowing border": "Border", - "Unknown": "Unknown" + "Unknown": "Unknown", + "Unknown4": "Mode 4" } }, "sunseeker_battery": { @@ -114,7 +115,8 @@ "On the way home": "Going home", "Charging": "Charging", "Mowing border": "Border", - "Unknown": "Unknown" + "Unknown": "Unknown", + "Unknown4": "Mode 4" } } },