Skip to content

Commit

Permalink
code sync
Browse files Browse the repository at this point in the history
  • Loading branch information
pwesters committed Dec 27, 2024
1 parent c31b182 commit 1f96817
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/watts_vision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

hass.data[DOMAIN][API_CLIENT] = client

await hass.config_entries.async_forward_entry_setups(entry, platform)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

async def refresh_devices(event_time):
await hass.async_add_executor_job(client.reloadDevices)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/watts_vision/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/pwesters/watts_vision/issues",
"requirements": [],
"version": "0.4.6"
"version": "0.4.7"
}
6 changes: 3 additions & 3 deletions custom_components/watts_vision/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import UnitOfTemperature
from homeassistant.core import HomeAssistant
from numpy import nan as npNaN
from numpy import nan as NaN

from .central_unit import WattsVisionLastCommunicationSensor
from .const import API_CLIENT, DOMAIN, ERROR_MAP, PRESET_MODE_MAP
Expand Down Expand Up @@ -261,7 +261,7 @@ async def async_update(self):
if smartHomeDevice["gv_mode"] == "0":
self._state = smartHomeDevice["consigne_confort"]
if smartHomeDevice["gv_mode"] == "1":
self._state = npNaN
self._state = NaN
if smartHomeDevice["gv_mode"] == "2":
self._state = smartHomeDevice["consigne_hg"]
if smartHomeDevice["gv_mode"] == "3":
Expand All @@ -270,7 +270,7 @@ async def async_update(self):
self._state = smartHomeDevice["consigne_boost"]
if smartHomeDevice["gv_mode"] == "11" or smartHomeDevice["gv_mode"] == "8":
self._state = smartHomeDevice["consigne_manuel"]
if self._state != npNaN:
if self._state != NaN:
if self.hass.config.units.temperature_unit == UnitOfTemperature.CELSIUS:
# self._state = round((int(self._state) - 320) * 5 / 9 / 10, 1)
self._state = round(
Expand Down

0 comments on commit 1f96817

Please sign in to comment.