Skip to content

Commit

Permalink
Merge pull request #394 from asantaga/dev
Browse files Browse the repository at this point in the history
v3.3.11
  • Loading branch information
msp1974 authored Nov 3, 2023
2 parents 284dc4d + 262b23d commit 80eb457
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Wiser Home Assistant Integration v3.3.10
# Wiser Home Assistant Integration v3.3.11

[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge)](https://github.com/hacs/integration)
[![downloads](https://shields.io/github/downloads/asantaga/wiserHomeAssistantPlatform/latest/total?style=for-the-badge)](https://github.com/asantaga/wiserHomeAssistantPlatform)
Expand Down Expand Up @@ -26,6 +26,10 @@ For more information checkout the AMAZING community thread available on

## Change log

- v3.3.11
- Add check for overrides to prevent turning off away modewhen selecting cancel overrides when none exist (Wiser hub bug)
- Correct sensor device class and native values to fix history not displaying issue in HA 2023.11

- v3.3.10
- bump api to v1.3.8 to fix passive mode error if room trv/roomstat goes offline
- make battery sensor unavailable if no battery info provided by hub (previously showed 0%)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/wiser/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
URL_BASE = "/wiser"
WISER_CARD_FILENAMES = ["wiser-schedule-card.js", "wiser-zigbee-card.js"]

VERSION = "3.3.9"
VERSION = "3.3.11"
WISER_PLATFORMS = [
"climate",
"sensor",
Expand Down
4 changes: 2 additions & 2 deletions custom_components/wiser/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/asantaga/wiserHomeAssistantPlatform/issues",
"requirements": [
"aioWiserHeatAPI==1.3.8"
"aioWiserHeatAPI==1.3.9"
],
"version": "3.3.9",
"version": "3.3.11",
"zeroconf": [
{
"type": "_http._tcp.local.",
Expand Down
14 changes: 11 additions & 3 deletions custom_components/wiser/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ class WiserSensor(CoordinatorEntity, SensorEntity):
def __init__(self, coordinator, device_id=0, sensor_type="") -> None:
"""Initialize the sensor."""
super().__init__(coordinator)
self._attr_device_class = SensorDeviceClass.POWER_FACTOR
self._data = coordinator
self._device = None
self._device_id = device_id
Expand Down Expand Up @@ -196,6 +195,11 @@ def state(self):
_LOGGER.debug("%s device state requested", self.name)
return self._state

@property
def native_value(self):
"""Return the native value of this entity"""
return self._state

@property
def unique_id(self):
"""Return uniqueid."""
Expand All @@ -219,7 +223,6 @@ class WiserBatterySensor(WiserSensor):

def __init__(self, data, device_id=0, sensor_type="") -> None:
"""Initialise the battery sensor."""
self._attr_device_class = SensorDeviceClass.BATTERY
super().__init__(data, device_id, sensor_type)
self._device = self._data.wiserhub.devices.get_by_id(self._device_id)
self._state = self._device.battery.percent
Expand All @@ -245,7 +248,7 @@ def device_class(self):
@property
def native_unit_of_measurement(self):
"""Return the unit of measurement of this entity."""
return "%"
return PERCENTAGE

@property
def extra_state_attributes(self):
Expand Down Expand Up @@ -299,6 +302,11 @@ async def async_update(self) -> None:
"""Fetch new state data for the sensor."""
await super().async_update()

@property
def native_unit_of_measurement(self):
"""Return the native uom"""
return None

@property
def name(self):
"""Return the name of the sensor."""
Expand Down
4 changes: 2 additions & 2 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Drayton Wiser Integration for Home Assistant",
"homeassistant": "2023.02",
"homeassistant": "2023.10",
"render_readme": true,
"zip_release": true,
"filename": "wiser.zip"
}
}

0 comments on commit 80eb457

Please sign in to comment.