diff --git a/custom_components/tahoma/entity.py b/custom_components/tahoma/entity.py index d20d20726..12e7d1172 100644 --- a/custom_components/tahoma/entity.py +++ b/custom_components/tahoma/entity.py @@ -98,6 +98,7 @@ def device_info(self) -> DeviceInfo: sw_version=self.executor.select_attribute(CORE_FIRMWARE_REVISION), suggested_area=self.coordinator.areas[self.device.place_oid], via_device=self.executor.get_gateway_id(), + configuration_url=self.coordinator.client.server.configuration_url, ) @property diff --git a/custom_components/tahoma/number.py b/custom_components/tahoma/number.py index b515f37e2..c001be2ed 100644 --- a/custom_components/tahoma/number.py +++ b/custom_components/tahoma/number.py @@ -1,6 +1,7 @@ """Support for Overkiz number devices.""" from homeassistant.components.number import NumberEntity from homeassistant.config_entries import ConfigEntry +from homeassistant.const import ENTITY_CATEGORY_CONFIG from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -14,6 +15,7 @@ name="My Position", icon="mdi:content-save-cog", command="setMemorized1Position", + entity_category=ENTITY_CATEGORY_CONFIG, ), # WaterHeater: Expected Number Of Shower (2 - 4) OverkizNumberDescription( @@ -23,6 +25,7 @@ command="setExpectedNumberOfShower", min_value=2, max_value=4, + entity_category=ENTITY_CATEGORY_CONFIG, ), ] diff --git a/custom_components/tahoma/sensor.py b/custom_components/tahoma/sensor.py index aef5dccae..4676d567c 100644 --- a/custom_components/tahoma/sensor.py +++ b/custom_components/tahoma/sensor.py @@ -13,6 +13,7 @@ from homeassistant.const import ( CONCENTRATION_PARTS_PER_MILLION, ENERGY_WATT_HOUR, + ENTITY_CATEGORY_DIAGNOSTIC, LIGHT_LUX, PERCENTAGE, POWER_WATT, @@ -39,12 +40,14 @@ native_unit_of_measurement=PERCENTAGE, device_class=sensor.DEVICE_CLASS_BATTERY, state_class=STATE_CLASS_MEASUREMENT, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), OverkizSensorDescription( key="core:BatteryState", name="Battery", device_class=sensor.DEVICE_CLASS_BATTERY, native_value=lambda value: str(value).capitalize(), + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), OverkizSensorDescription( key="core:RSSILevelState", @@ -53,6 +56,7 @@ device_class=sensor.DEVICE_CLASS_SIGNAL_STRENGTH, state_class=STATE_CLASS_MEASUREMENT, native_value=lambda value: round(value), + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), OverkizSensorDescription( key="core:ExpectedNumberOfShowerState", @@ -313,6 +317,7 @@ entity_registry_enabled_default=False, native_value=lambda value: str(value).capitalize(), device_class=sensor.DEVICE_CLASS_SIGNAL_STRENGTH, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), # DomesticHotWaterProduction/WaterHeatingSystem OverkizSensorDescription( @@ -389,6 +394,7 @@ def __init__(self, device_url: str, coordinator: OverkizDataUpdateCoordinator): super().__init__(device_url, coordinator) self._attr_name = "HomeKit Setup Code" self._attr_icon = "mdi:shield-home" + self._attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC @property def state(self): diff --git a/custom_components/tahoma/switch.py b/custom_components/tahoma/switch.py index 8264e28b0..e94843134 100644 --- a/custom_components/tahoma/switch.py +++ b/custom_components/tahoma/switch.py @@ -8,7 +8,7 @@ SwitchEntity, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.const import STATE_OFF, STATE_ON +from homeassistant.const import ENTITY_CATEGORY_CONFIG, STATE_OFF, STATE_ON from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.restore_state import RestoreEntity @@ -140,6 +140,7 @@ def __init__(self, device_url: str, coordinator: OverkizDataUpdateCoordinator): super().__init__(device_url, coordinator) self._is_on = False self._attr_name = f"{super().name} low speed" + self._attr_entity_category = ENTITY_CATEGORY_CONFIG async def async_added_to_hass(self): """Run when entity about to be added.""" diff --git a/hacs.json b/hacs.json index 8fab2b2d2..c78d3f2eb 100644 --- a/hacs.json +++ b/hacs.json @@ -11,7 +11,7 @@ "switch", "water_heater" ], - "homeassistant": "2021.9.0", + "homeassistant": "2021.11.0", "render_readme": "true", "iot_class": "Cloud Polling" } \ No newline at end of file diff --git a/requirements_dev.txt b/requirements_dev.txt index adfb8e1ea..ab87ddfe9 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,2 +1,2 @@ -r requirements.txt -homeassistant==2021.9.0b2 +homeassistant==2021.11.0b0 \ No newline at end of file diff --git a/requirements_test.txt b/requirements_test.txt index d09ba4fef..618f50340 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,5 +1,5 @@ -r requirements_dev.txt -pytest-homeassistant-custom-component==0.4.4 +pytest-homeassistant-custom-component==0.4.6 # required for DHCP discovery test scapy==2.4.5 aiodiscover==1.4.2