This commit is contained in:
Home Assistant Version Control
2026-08-20 15:12:02 +00:00
parent 520c6f5bb2
commit 33669f8f1e
7 changed files with 41 additions and 31 deletions
+1 -1
View File
@@ -12,5 +12,5 @@
"iot_class": "cloud_push", "iot_class": "cloud_push",
"issue_tracker": "https://github.com/dvd-dev/hilo/issues", "issue_tracker": "https://github.com/dvd-dev/hilo/issues",
"requirements": ["python-hilo>=2026.3.5"], "requirements": ["python-hilo>=2026.3.5"],
"version": "2026.8.2" "version": "2026.8.3"
} }
+12 -2
View File
@@ -23,11 +23,21 @@ from homeassistant.const import (
Platform, Platform,
UnitOfEnergy, UnitOfEnergy,
UnitOfPower, UnitOfPower,
UnitOfRatio,
UnitOfSoundPressure, UnitOfSoundPressure,
UnitOfTemperature, UnitOfTemperature,
__short_version__ as current_version, __short_version__ as current_version,
) )
# This is to add backward compatibility
try:
from homeassistant.const import UnitOfRatio
_PARTS_PER_MILLION = UnitOfRatio.PARTS_PER_MILLION
except ImportError:
from homeassistant.const import CONCENTRATION_PARTS_PER_MILLION
_PARTS_PER_MILLION = CONCENTRATION_PARTS_PER_MILLION
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.debounce import Debouncer from homeassistant.helpers.debounce import Debouncer
@@ -271,7 +281,7 @@ class Co2Sensor(HiloEntity, SensorEntity):
"""Define a Co2 sensor entity.""" """Define a Co2 sensor entity."""
_attr_device_class = SensorDeviceClass.CO2 _attr_device_class = SensorDeviceClass.CO2
_attr_native_unit_of_measurement = UnitOfRatio.PARTS_PER_MILLION _attr_native_unit_of_measurement = _PARTS_PER_MILLION
_attr_state_class = SensorStateClass.MEASUREMENT _attr_state_class = SensorStateClass.MEASUREMENT
def __init__(self, hilo, device): def __init__(self, hilo, device):
+28 -28
View File
@@ -4,10 +4,10 @@
"state": "ON", "state": "ON",
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 121.2, "voltage": 121,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.11, "power_factor": 0.14,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -22,15 +22,15 @@
}, },
"0xffffb40e0607af27": { "0xffffb40e0607af27": {
"state": "ON", "state": "ON",
"voltage": 121.3, "voltage": 120.2,
"ac_frequency": 60, "ac_frequency": 60,
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"power": 2.4, "power": 2,
"current": 0.1, "current": 0.1,
"energy": 30.9, "energy": 30.95,
"power_factor": 0.17, "power_factor": 0.18,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -45,9 +45,9 @@
"state": "ON", "state": "ON",
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 120.7, "voltage": 120.4,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"energy": 61.99, "energy": 62.04,
"power_factor": 0.87, "power_factor": 0.87,
"ac_frequency": 60, "ac_frequency": 60,
"update": { "update": {
@@ -58,8 +58,8 @@
"latest_release_notes": null "latest_release_notes": null
}, },
"linkquality": 134, "linkquality": 134,
"power": 83.4, "power": 82.8,
"current": 0.86, "current": 0.81,
"power_on_behavior": "on" "power_on_behavior": "on"
}, },
"0xb40e060fffe031e3": { "0xb40e060fffe031e3": {
@@ -74,13 +74,13 @@
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"voltage": 119.8, "voltage": 119.5,
"state": "ON", "state": "ON",
"ac_frequency": 60, "ac_frequency": 60,
"energy": 125.86, "energy": 125.94,
"power": 100.5, "power": 99.5,
"current": 0.87, "current": 0.87,
"power_factor": 0.41, "power_factor": 0.94,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -95,13 +95,13 @@
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"voltage": 121.2, "voltage": 120,
"energy": 57.84, "energy": 57.97,
"state": "ON", "state": "ON",
"power": 87, "power": 80,
"current": 1.05, "current": 0.87,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.76, "power_factor": 0.81,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -114,12 +114,12 @@
}, },
"0xffffb40e060895b3": { "0xffffb40e060895b3": {
"state": "ON", "state": "ON",
"voltage": 121.5, "voltage": 120.7,
"ac_frequency": 60, "ac_frequency": 60,
"energy": 8.67, "energy": 8.67,
"current": 0.01, "current": 0.01,
"power": 0.1, "power": 0.2,
"power_factor": 0.11, "power_factor": 0.22,
"linkquality": 123, "linkquality": 123,
"update": { "update": {
"state": "idle", "state": "idle",
@@ -142,8 +142,8 @@
"state": "ON", "state": "ON",
"current": 0.02, "current": 0.02,
"ac_frequency": 60, "ac_frequency": 60,
"power": 0.3, "power": 0.4,
"power_factor": 0.15, "power_factor": 0.18,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -172,7 +172,7 @@
"0xffffb40e060893d8": { "0xffffb40e060893d8": {
"state": "ON", "state": "ON",
"led_brightness": 100, "led_brightness": 100,
"voltage": 121.7, "voltage": 121.9,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"energy": 3.16, "energy": 3.16,
@@ -188,11 +188,11 @@
"latest_release_notes": null "latest_release_notes": null
}, },
"power_factor": 0.06, "power_factor": 0.06,
"power": 0.6 "power": 0.1
}, },
"0xa4c1380d0679ffff": { "0xa4c1380d0679ffff": {
"battery": 100, "battery": 100,
"temperature": 27.1, "temperature": 27.2,
"temperature_units": "celsius", "temperature_units": "celsius",
"temperature_calibration": 0, "temperature_calibration": 0,
"update": { "update": {
@@ -245,7 +245,7 @@
}, },
"0xb40e060fffe717c5": { "0xb40e060fffe717c5": {
"battery": 100, "battery": 100,
"occupancy": false, "occupancy": true,
"tamper": false, "tamper": false,
"battery_low": false, "battery_low": false,
"linkquality": 72, "linkquality": 72,