Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions homeassistant/components/cast/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"codeowners": ["@emontnemery"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/cast",
"integration_type": "hub",
"iot_class": "local_polling",
"loggers": ["casttube", "pychromecast"],
"requirements": ["PyChromecast==14.0.9"],
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/hikvision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: HikvisionConfigEntry) ->

def fetch_and_inject_nvr_events() -> None:
"""Fetch and inject NVR events in a single executor job."""
if nvr_events := camera.get_event_triggers(None):
if nvr_events := camera.get_event_triggers():
camera.inject_events(nvr_events)

await hass.async_add_executor_job(fetch_and_inject_nvr_events)
Expand Down
7 changes: 6 additions & 1 deletion homeassistant/components/nuki/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

from pynuki.device import NukiDevice

from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import PERCENTAGE, EntityCategory
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -34,6 +38,7 @@ class NukiBatterySensor(NukiEntity[NukiDevice], SensorEntity):
_attr_has_entity_name = True
_attr_native_unit_of_measurement = PERCENTAGE
_attr_device_class = SensorDeviceClass.BATTERY
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_entity_category = EntityCategory.DIAGNOSTIC

@property
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/xiaomi_miio/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"codeowners": ["@rytilahti", "@syssi", "@starkillerOG"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/xiaomi_miio",
"integration_type": "hub",
"iot_class": "local_polling",
"loggers": ["micloud", "miio"],
"requirements": ["construct==2.10.68", "micloud==0.5", "python-miio==0.5.12"],
Expand Down
5 changes: 4 additions & 1 deletion tests/components/nuki/snapshots/test_sensor.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
Expand Down Expand Up @@ -39,6 +41,7 @@
'attributes': ReadOnlyDict({
'device_class': 'battery',
'friendly_name': 'Home Battery',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': '%',
}),
'context': <ANY>,
Expand Down
Loading