Skip to content

Commit

Permalink
Merge pull request #157 from msp1974/dev
Browse files Browse the repository at this point in the history
Updates for #154 and #155
  • Loading branch information
msp1974 authored Oct 3, 2021
2 parents f1bca89 + 04a3d22 commit 5c0aa19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion custom_components/wiser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from datetime import timedelta
from functools import partial
import json
from ruamel.yaml import YAML as yaml

import requests.exceptions
import voluptuous as vol
Expand All @@ -35,7 +36,7 @@
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
from homeassistant.helpers.dispatcher import dispatcher_send
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.util import ruamel_yaml as yaml, Throttle
from homeassistant.util import Throttle

from .const import (
CONF_SETPOINT_MODE,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/wiser/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"dependencies": [],
"codeowners": ["@asantaga", "@msp1974"],
"version": "2.6",
"requirements": ["wiser-heating-api==1.0.10.0"]
"requirements": ["wiser-heating-api==1.0.10.0", "ruamel.yaml==0.15.100"]
}
3 changes: 2 additions & 1 deletion custom_components/wiser/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[email protected]
"""

from datetime import datetime
from homeassistant.const import ATTR_BATTERY_LEVEL, DEVICE_CLASS_BATTERY
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity
Expand Down Expand Up @@ -367,6 +367,7 @@ def device_state_attributes(self):
attrs["zigbee_channel"] = (
self.data.wiserhub.getHubData().get("Zigbee").get("NetworkChannel")
)
attrs["last_updated"] = datetime.now()

# Network Data
attrs["node_id"] = device_data.get("NodeId")
Expand Down

0 comments on commit 5c0aa19

Please sign in to comment.