mirror of
https://github.com/home-assistant/core.git
synced 2026-04-29 10:23:46 +02:00
Compare commits
96 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ef6fed5067 | |||
| 0a627aed6d | |||
| cb03a6e29b | |||
| e630027455 | |||
| 280d7ef4ec | |||
| 93b7ffa807 | |||
| cc8e9ac141 | |||
| 2724b115da | |||
| 150fb151fa | |||
| 4b8cb35ba0 | |||
| 5cce878b85 | |||
| 92ebc5b436 | |||
| 463320c8ee | |||
| 3bf5fa9302 | |||
| 650ab70444 | |||
| bb8a74a3f4 | |||
| 49445c46a0 | |||
| 490101fa92 | |||
| 2ac4bb8e9f | |||
| 1c0a6970e2 | |||
| f3f69a8107 | |||
| a77bcccbbb | |||
| e98da8596a | |||
| 5843c93371 | |||
| 5991b06574 | |||
| fecdfbfb9f | |||
| 8cfe3821da | |||
| cba67d1525 | |||
| 39df394414 | |||
| db91a40b55 | |||
| 3181358484 | |||
| 776e2da4e6 | |||
| 72ffdf4f4b | |||
| 36bba95fd0 | |||
| 13fc69d8a8 | |||
| 94464f220c | |||
| 13decb9b10 | |||
| b6226acd2b | |||
| d04282a41c | |||
| a671d0bc6c | |||
| 6c84e8dff0 | |||
| 57279b1c7b | |||
| a5646e0df2 | |||
| 63ad3ebdf4 | |||
| f2a9ef6591 | |||
| 2a5bb66c06 | |||
| 0c0be6d6a1 | |||
| e99a58ad53 | |||
| 6c4b773bc1 | |||
| c571f36c6c | |||
| f1b041afbe | |||
| 183af92658 | |||
| d71dd12263 | |||
| 18a7aa20b4 | |||
| f8fde71ef3 | |||
| 966798b588 | |||
| 66b6f81996 | |||
| 4a1a5b9e87 | |||
| f01f033b3f | |||
| cd884de79e | |||
| 14be7e4a72 | |||
| 2be71d53c5 | |||
| 1c960d300d | |||
| 87a1482e4d | |||
| 24b8e60978 | |||
| 404e30911b | |||
| 9c599f7513 | |||
| f3e8360949 | |||
| 43f8731f8a | |||
| 4a60d36216 | |||
| 07a1ee0baa | |||
| a57c30be88 | |||
| b1bf69689e | |||
| 4735aadaa8 | |||
| f18f161efa | |||
| 3c90e3d83f | |||
| 57a43ef151 | |||
| 6afc6ca126 | |||
| 92a3edc536 | |||
| e91e67b400 | |||
| 7a7bcf1a92 | |||
| 1383a0c13a | |||
| 12e3077895 | |||
| 05c0973937 | |||
| 7467d588c8 | |||
| 0c82e0a618 | |||
| 5a4f88349a | |||
| e720e82fd6 | |||
| 8ed0af2fb7 | |||
| 550c0bf3c3 | |||
| 8bb98b4146 | |||
| bd5bc6b83d | |||
| a2b6b0a0bc | |||
| 41ad3d8987 | |||
| 3e7dc3588d | |||
| 66d802b5e5 |
@@ -74,6 +74,7 @@ class AdaxDevice(ClimateEntity):
|
||||
)
|
||||
_attr_target_temperature_step = PRECISION_WHOLE
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, heater_data: dict[str, Any], adax_data_handler: Adax) -> None:
|
||||
"""Initialize the heater."""
|
||||
|
||||
@@ -83,6 +83,7 @@ class AdvantageAirAC(AdvantageAirAcEntity, ClimateEntity):
|
||||
_attr_max_temp = 32
|
||||
_attr_min_temp = 16
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, instance: AdvantageAirData, ac_key: str) -> None:
|
||||
"""Initialize an AdvantageAir AC unit."""
|
||||
@@ -202,11 +203,16 @@ class AdvantageAirZone(AdvantageAirZoneEntity, ClimateEntity):
|
||||
"""AdvantageAir MyTemp Zone control."""
|
||||
|
||||
_attr_hvac_modes = [HVACMode.OFF, HVACMode.HEAT_COOL]
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_target_temperature_step = PRECISION_WHOLE
|
||||
_attr_max_temp = 32
|
||||
_attr_min_temp = 16
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, instance: AdvantageAirData, ac_key: str, zone_key: str) -> None:
|
||||
"""Initialize an AdvantageAir Zone control."""
|
||||
|
||||
@@ -117,6 +117,7 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
|
||||
_attr_name = None
|
||||
_speeds: dict[int, str] = {}
|
||||
_speeds_reverse: dict[str, int] = {}
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -129,7 +130,11 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
|
||||
super().__init__(coordinator, entry, system_zone_id, zone_data)
|
||||
|
||||
self._attr_unique_id = f"{self._attr_unique_id}_{system_zone_id}"
|
||||
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
self._attr_target_temperature_step = API_TEMPERATURE_STEP
|
||||
self._attr_temperature_unit = TEMP_UNIT_LIB_TO_HASS[
|
||||
self.get_airzone_value(AZD_TEMP_UNIT)
|
||||
|
||||
@@ -144,8 +144,13 @@ class AirzoneClimate(AirzoneEntity, ClimateEntity):
|
||||
"""Define an Airzone Cloud climate."""
|
||||
|
||||
_attr_name = None
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@callback
|
||||
def _handle_coordinator_update(self) -> None:
|
||||
|
||||
@@ -153,10 +153,15 @@ class AmbiclimateEntity(ClimateEntity):
|
||||
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_target_temperature_step = 1
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF]
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, heater: AmbiclimateDevice, store: Store[dict[str, Any]]) -> None:
|
||||
"""Initialize the thermostat."""
|
||||
|
||||
@@ -46,6 +46,7 @@ class AtagThermostat(AtagEntity, ClimateEntity):
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
)
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator, atag_id):
|
||||
"""Initialize an Atag climate device."""
|
||||
|
||||
@@ -33,10 +33,15 @@ async def async_setup_entry(
|
||||
class BAFAutoComfort(BAFEntity, ClimateEntity):
|
||||
"""BAF climate auto comfort."""
|
||||
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_hvac_modes = [HVACMode.OFF, HVACMode.FAN_ONLY]
|
||||
_attr_translation_key = "auto_comfort"
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@callback
|
||||
def _async_update_attrs(self) -> None:
|
||||
|
||||
@@ -63,6 +63,7 @@ class BalboaClimateEntity(BalboaEntity, ClimateEntity):
|
||||
)
|
||||
_attr_translation_key = DOMAIN
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, client: SpaClient) -> None:
|
||||
"""Initialize the climate entity."""
|
||||
|
||||
@@ -53,8 +53,13 @@ async def async_setup_entry(
|
||||
class BleBoxClimateEntity(BleBoxEntity[blebox_uniapi.climate.Climate], ClimateEntity):
|
||||
"""Representation of a BleBox climate feature (saunaBox)."""
|
||||
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@property
|
||||
def hvac_modes(self):
|
||||
|
||||
@@ -35,9 +35,14 @@ class BroadlinkThermostat(ClimateEntity, BroadlinkEntity):
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF, HVACMode.AUTO]
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_target_temperature_step = PRECISION_HALVES
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, device: BroadlinkDevice) -> None:
|
||||
"""Initialize the climate entity."""
|
||||
|
||||
@@ -73,12 +73,16 @@ class BSBLANClimate(
|
||||
_attr_name = None
|
||||
# Determine preset modes
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.PRESET_MODE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_preset_modes = PRESET_MODES
|
||||
|
||||
# Determine hvac modes
|
||||
_attr_hvac_modes = HVAC_MODES
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -98,6 +98,6 @@ class TurboJPEGSingleton:
|
||||
TurboJPEGSingleton.__instance = TurboJPEG()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
_LOGGER.exception(
|
||||
"Error loading libturbojpeg; Cameras may impact HomeKit performance"
|
||||
"Error loading libturbojpeg; Camera snapshot performance will be sub-optimal"
|
||||
)
|
||||
TurboJPEGSingleton.__instance = False
|
||||
|
||||
@@ -4,8 +4,11 @@ from __future__ import annotations
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from aioelectricitymaps import ElectricityMaps
|
||||
from aioelectricitymaps.exceptions import ElectricityMapsError, InvalidToken
|
||||
from aioelectricitymaps import (
|
||||
ElectricityMaps,
|
||||
ElectricityMapsError,
|
||||
ElectricityMapsInvalidTokenError,
|
||||
)
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
@@ -146,7 +149,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
|
||||
try:
|
||||
await fetch_latest_carbon_intensity(self.hass, em, data)
|
||||
except InvalidToken:
|
||||
except ElectricityMapsInvalidTokenError:
|
||||
errors["base"] = "invalid_auth"
|
||||
except ElectricityMapsError:
|
||||
errors["base"] = "unknown"
|
||||
|
||||
@@ -4,9 +4,12 @@ from __future__ import annotations
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from aioelectricitymaps import ElectricityMaps
|
||||
from aioelectricitymaps.exceptions import ElectricityMapsError, InvalidToken
|
||||
from aioelectricitymaps.models import CarbonIntensityResponse
|
||||
from aioelectricitymaps import (
|
||||
CarbonIntensityResponse,
|
||||
ElectricityMaps,
|
||||
ElectricityMapsError,
|
||||
ElectricityMapsInvalidTokenError,
|
||||
)
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
@@ -43,7 +46,7 @@ class CO2SignalCoordinator(DataUpdateCoordinator[CarbonIntensityResponse]):
|
||||
return await fetch_latest_carbon_intensity(
|
||||
self.hass, self.client, self.config_entry.data
|
||||
)
|
||||
except InvalidToken as err:
|
||||
except ElectricityMapsInvalidTokenError as err:
|
||||
raise ConfigEntryAuthFailed from err
|
||||
except ElectricityMapsError as err:
|
||||
raise UpdateFailed(str(err)) from err
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
"integration_type": "service",
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["aioelectricitymaps"],
|
||||
"requirements": ["aioelectricitymaps==0.2.0"]
|
||||
"requirements": ["aioelectricitymaps==0.3.0"]
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ async def websocket_hass_agent_debug(
|
||||
},
|
||||
# Slot values that would be received by the intent
|
||||
"slots": { # direct access to values
|
||||
entity_key: entity.value
|
||||
entity_key: entity.text or entity.value
|
||||
for entity_key, entity in result.entities.items()
|
||||
},
|
||||
# Extra slot details, such as the originally matched text
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Standard conversation implementation for Home Assistant."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
@@ -264,9 +265,11 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
_LOGGER.debug(
|
||||
"Recognized intent '%s' for template '%s' but had unmatched: %s",
|
||||
result.intent.name,
|
||||
result.intent_sentence.text
|
||||
if result.intent_sentence is not None
|
||||
else "",
|
||||
(
|
||||
result.intent_sentence.text
|
||||
if result.intent_sentence is not None
|
||||
else ""
|
||||
),
|
||||
result.unmatched_entities_list,
|
||||
)
|
||||
error_response_type, error_response_args = _get_unmatched_response(result)
|
||||
@@ -285,7 +288,8 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
|
||||
# Slot values to pass to the intent
|
||||
slots = {
|
||||
entity.name: {"value": entity.value} for entity in result.entities_list
|
||||
entity.name: {"value": entity.value, "text": entity.text or entity.value}
|
||||
for entity in result.entities_list
|
||||
}
|
||||
|
||||
try:
|
||||
@@ -474,9 +478,11 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
for entity_name, entity_value in recognize_result.entities.items()
|
||||
},
|
||||
# First matched or unmatched state
|
||||
"state": template.TemplateState(self.hass, state1)
|
||||
if state1 is not None
|
||||
else None,
|
||||
"state": (
|
||||
template.TemplateState(self.hass, state1)
|
||||
if state1 is not None
|
||||
else None
|
||||
),
|
||||
"query": {
|
||||
# Entity states that matched the query (e.g, "on")
|
||||
"matched": [
|
||||
@@ -734,7 +740,7 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
|
||||
if not entity:
|
||||
# Default name
|
||||
entity_names.append((state.name, state.name, context))
|
||||
entity_names.append((state.name, state.entity_id, context))
|
||||
continue
|
||||
|
||||
if entity.aliases:
|
||||
@@ -742,10 +748,10 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
if not alias.strip():
|
||||
continue
|
||||
|
||||
entity_names.append((alias, alias, context))
|
||||
entity_names.append((alias, state.entity_id, context))
|
||||
|
||||
# Default name
|
||||
entity_names.append((state.name, state.name, context))
|
||||
entity_names.append((state.name, state.entity_id, context))
|
||||
|
||||
# Expose all areas
|
||||
areas = ar.async_get(self.hass)
|
||||
@@ -785,7 +791,7 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
if device_area is None:
|
||||
return None
|
||||
|
||||
return {"area": device_area.id}
|
||||
return {"area": {"value": device_area.id, "text": device_area.name}}
|
||||
|
||||
def _get_error_text(
|
||||
self,
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
"integration_type": "system",
|
||||
"iot_class": "local_push",
|
||||
"quality_scale": "internal",
|
||||
"requirements": ["hassil==1.6.0", "home-assistant-intents==2024.2.1"]
|
||||
"requirements": ["hassil==1.6.1", "home-assistant-intents==2024.2.2"]
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ class DeconzThermostat(DeconzDevice[Thermostat], ClimateEntity):
|
||||
TYPE = DOMAIN
|
||||
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, device: Thermostat, gateway: DeconzGateway) -> None:
|
||||
"""Set up thermostat device."""
|
||||
@@ -119,7 +120,11 @@ class DeconzThermostat(DeconzDevice[Thermostat], ClimateEntity):
|
||||
HVAC_MODE_TO_DECONZ[item]: item for item in self._attr_hvac_modes
|
||||
}
|
||||
|
||||
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
|
||||
if device.fan_mode:
|
||||
self._attr_supported_features |= ClimateEntityFeature.FAN_MODE
|
||||
|
||||
@@ -97,6 +97,7 @@ class DemoClimate(ClimateEntity):
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
_attr_translation_key = "ubercool"
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -137,6 +138,9 @@ class DemoClimate(ClimateEntity):
|
||||
self._attr_supported_features |= (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||
)
|
||||
self._attr_supported_features |= (
|
||||
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
self._target_temperature = target_temperature
|
||||
self._target_humidity = target_humidity
|
||||
self._unit_of_measurement = unit_of_measurement
|
||||
|
||||
@@ -75,7 +75,7 @@ async def _validate_input(
|
||||
rest_config = create_rest_config(
|
||||
aiohttp_client.async_get_clientsession(hass),
|
||||
device_id=device_id,
|
||||
country=country,
|
||||
alpha_2_country=country,
|
||||
override_rest_url=rest_url,
|
||||
)
|
||||
|
||||
@@ -266,6 +266,10 @@ class EcovacsConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
# If not we will inform the user about the mismatch.
|
||||
error = None
|
||||
placeholders = None
|
||||
|
||||
# Convert the country to upper case as ISO 3166-1 alpha-2 country codes are upper case
|
||||
user_input[CONF_COUNTRY] = user_input[CONF_COUNTRY].upper()
|
||||
|
||||
if len(user_input[CONF_COUNTRY]) != 2:
|
||||
error = "invalid_country_length"
|
||||
placeholders = {"countries_url": "https://www.iso.org/obp/ui/#search/code/"}
|
||||
|
||||
@@ -49,7 +49,7 @@ class EcovacsController:
|
||||
create_rest_config(
|
||||
aiohttp_client.async_get_clientsession(self._hass),
|
||||
device_id=self._device_id,
|
||||
country=country,
|
||||
alpha_2_country=country,
|
||||
override_rest_url=config.get(CONF_OVERRIDE_REST_URL),
|
||||
),
|
||||
config[CONF_USERNAME],
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/ecovacs",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["sleekxmppfs", "sucks", "deebot_client"],
|
||||
"requirements": ["py-sucks==0.9.8", "deebot-client==5.0.0"]
|
||||
"requirements": ["py-sucks==0.9.8", "deebot-client==5.1.0"]
|
||||
}
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
"name": "Relocate"
|
||||
},
|
||||
"reset_lifespan_brush": {
|
||||
"name": "Reset brush lifespan"
|
||||
"name": "Reset main brush lifespan"
|
||||
},
|
||||
"reset_lifespan_filter": {
|
||||
"name": "Reset filter lifespan"
|
||||
},
|
||||
"reset_lifespan_side_brush": {
|
||||
"name": "Reset side brush lifespan"
|
||||
"name": "Reset side brushes lifespan"
|
||||
}
|
||||
},
|
||||
"image": {
|
||||
@@ -79,13 +79,13 @@
|
||||
}
|
||||
},
|
||||
"lifespan_brush": {
|
||||
"name": "Brush lifespan"
|
||||
"name": "Main brush lifespan"
|
||||
},
|
||||
"lifespan_filter": {
|
||||
"name": "Filter lifespan"
|
||||
},
|
||||
"lifespan_side_brush": {
|
||||
"name": "Side brush lifespan"
|
||||
"name": "Side brushes lifespan"
|
||||
},
|
||||
"network_ip": {
|
||||
"name": "IP address"
|
||||
@@ -100,7 +100,7 @@
|
||||
"name": "Area cleaned"
|
||||
},
|
||||
"stats_time": {
|
||||
"name": "Time cleaned"
|
||||
"name": "Cleaning duration"
|
||||
},
|
||||
"total_stats_area": {
|
||||
"name": "Total area cleaned"
|
||||
@@ -109,12 +109,12 @@
|
||||
"name": "Total cleanings"
|
||||
},
|
||||
"total_stats_time": {
|
||||
"name": "Total time cleaned"
|
||||
"name": "Total cleaning duration"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
"water_amount": {
|
||||
"name": "Water amount",
|
||||
"name": "Water flow level",
|
||||
"state": {
|
||||
"high": "High",
|
||||
"low": "Low",
|
||||
@@ -137,7 +137,7 @@
|
||||
"name": "Advanced mode"
|
||||
},
|
||||
"carpet_auto_fan_boost": {
|
||||
"name": "Carpet auto fan speed boost"
|
||||
"name": "Carpet auto-boost suction"
|
||||
},
|
||||
"clean_preference": {
|
||||
"name": "Clean preference"
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
"integration_type": "device",
|
||||
"iot_class": "local_polling",
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["elgato==5.1.1"],
|
||||
"requirements": ["elgato==5.1.2"],
|
||||
"zeroconf": ["_elg._tcp.local."]
|
||||
}
|
||||
|
||||
@@ -35,8 +35,10 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
self._api_token = api_token = user_input[CONF_API_TOKEN]
|
||||
client = Elvia(meter_value_token=api_token).meter_value()
|
||||
try:
|
||||
end_time = dt_util.utcnow()
|
||||
results = await client.get_meter_values(
|
||||
start_time=(dt_util.now() - timedelta(hours=1)).isoformat()
|
||||
start_time=(end_time - timedelta(hours=1)).isoformat(),
|
||||
end_time=end_time.isoformat(),
|
||||
)
|
||||
|
||||
except ElviaError.AuthError as exception:
|
||||
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
from datetime import datetime, timedelta
|
||||
from typing import TYPE_CHECKING, cast
|
||||
|
||||
from elvia import Elvia
|
||||
from elvia import Elvia, error as ElviaError
|
||||
|
||||
from homeassistant.components.recorder.models import StatisticData, StatisticMetaData
|
||||
from homeassistant.components.recorder.statistics import (
|
||||
@@ -38,11 +38,18 @@ class ElviaImporter:
|
||||
self.client = Elvia(meter_value_token=api_token).meter_value()
|
||||
self.metering_point_id = metering_point_id
|
||||
|
||||
async def _fetch_hourly_data(self, since: datetime) -> list[MeterValueTimeSeries]:
|
||||
async def _fetch_hourly_data(
|
||||
self,
|
||||
since: datetime,
|
||||
until: datetime,
|
||||
) -> list[MeterValueTimeSeries]:
|
||||
"""Fetch hourly data."""
|
||||
LOGGER.debug("Fetching hourly data since %s", since)
|
||||
start_time = since.isoformat()
|
||||
end_time = until.isoformat()
|
||||
LOGGER.debug("Fetching hourly data %s - %s", start_time, end_time)
|
||||
all_data = await self.client.get_meter_values(
|
||||
start_time=since.isoformat(),
|
||||
start_time=start_time,
|
||||
end_time=end_time,
|
||||
metering_point_ids=[self.metering_point_id],
|
||||
)
|
||||
return all_data["meteringpoints"][0]["metervalue"]["timeSeries"]
|
||||
@@ -61,18 +68,37 @@ class ElviaImporter:
|
||||
)
|
||||
|
||||
if not last_stats:
|
||||
# First time we insert 1 years of data (if available)
|
||||
hourly_data = await self._fetch_hourly_data(
|
||||
since=dt_util.now() - timedelta(days=365)
|
||||
)
|
||||
# First time we insert 3 years of data (if available)
|
||||
hourly_data: list[MeterValueTimeSeries] = []
|
||||
until = dt_util.utcnow()
|
||||
for year in (3, 2, 1):
|
||||
try:
|
||||
year_hours = await self._fetch_hourly_data(
|
||||
since=until - timedelta(days=365 * year),
|
||||
until=until - timedelta(days=365 * (year - 1)),
|
||||
)
|
||||
except ElviaError.ElviaException:
|
||||
# This will raise if the contract have no data for the
|
||||
# year, we can safely ignore this
|
||||
continue
|
||||
hourly_data.extend(year_hours)
|
||||
|
||||
if hourly_data is None or len(hourly_data) == 0:
|
||||
LOGGER.error("No data available for the metering point")
|
||||
return
|
||||
last_stats_time = None
|
||||
_sum = 0.0
|
||||
else:
|
||||
hourly_data = await self._fetch_hourly_data(
|
||||
since=dt_util.utc_from_timestamp(last_stats[statistic_id][0]["end"])
|
||||
)
|
||||
try:
|
||||
hourly_data = await self._fetch_hourly_data(
|
||||
since=dt_util.utc_from_timestamp(
|
||||
last_stats[statistic_id][0]["end"]
|
||||
),
|
||||
until=dt_util.utcnow(),
|
||||
)
|
||||
except ElviaError.ElviaException as err:
|
||||
LOGGER.error("Error fetching data: %s", err)
|
||||
return
|
||||
|
||||
if (
|
||||
hourly_data is None
|
||||
|
||||
@@ -352,7 +352,6 @@ class ESPHomeManager:
|
||||
if self.voice_assistant_udp_server is not None:
|
||||
_LOGGER.warning("Voice assistant UDP server was not stopped")
|
||||
self.voice_assistant_udp_server.stop()
|
||||
self.voice_assistant_udp_server.close()
|
||||
self.voice_assistant_udp_server = None
|
||||
|
||||
hass = self.hass
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""ESPHome voice assistant support."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
@@ -67,7 +68,7 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
|
||||
"""Receive UDP packets and forward them to the voice assistant."""
|
||||
|
||||
started = False
|
||||
stopped = False
|
||||
stop_requested = False
|
||||
transport: asyncio.DatagramTransport | None = None
|
||||
remote_addr: tuple[str, int] | None = None
|
||||
|
||||
@@ -92,6 +93,11 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
|
||||
self._tts_done = asyncio.Event()
|
||||
self._tts_task: asyncio.Task | None = None
|
||||
|
||||
@property
|
||||
def is_running(self) -> bool:
|
||||
"""True if the the UDP server is started and hasn't been asked to stop."""
|
||||
return self.started and (not self.stop_requested)
|
||||
|
||||
async def start_server(self) -> int:
|
||||
"""Start accepting connections."""
|
||||
|
||||
@@ -99,7 +105,7 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
|
||||
"""Accept connection."""
|
||||
if self.started:
|
||||
raise RuntimeError("Can only start once")
|
||||
if self.stopped:
|
||||
if self.stop_requested:
|
||||
raise RuntimeError("No longer accepting connections")
|
||||
|
||||
self.started = True
|
||||
@@ -124,7 +130,7 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
|
||||
@callback
|
||||
def datagram_received(self, data: bytes, addr: tuple[str, int]) -> None:
|
||||
"""Handle incoming UDP packet."""
|
||||
if not self.started or self.stopped:
|
||||
if not self.is_running:
|
||||
return
|
||||
if self.remote_addr is None:
|
||||
self.remote_addr = addr
|
||||
@@ -142,19 +148,19 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
|
||||
def stop(self) -> None:
|
||||
"""Stop the receiver."""
|
||||
self.queue.put_nowait(b"")
|
||||
self.started = False
|
||||
self.stopped = True
|
||||
self.close()
|
||||
|
||||
def close(self) -> None:
|
||||
"""Close the receiver."""
|
||||
self.started = False
|
||||
self.stopped = True
|
||||
self.stop_requested = True
|
||||
|
||||
if self.transport is not None:
|
||||
self.transport.close()
|
||||
|
||||
async def _iterate_packets(self) -> AsyncIterable[bytes]:
|
||||
"""Iterate over incoming packets."""
|
||||
if not self.started or self.stopped:
|
||||
if not self.is_running:
|
||||
raise RuntimeError("Not running")
|
||||
|
||||
while data := await self.queue.get():
|
||||
@@ -303,8 +309,11 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
|
||||
|
||||
async def _send_tts(self, media_id: str) -> None:
|
||||
"""Send TTS audio to device via UDP."""
|
||||
# Always send stream start/end events
|
||||
self.handle_event(VoiceAssistantEventType.VOICE_ASSISTANT_TTS_STREAM_START, {})
|
||||
|
||||
try:
|
||||
if self.transport is None:
|
||||
if (not self.is_running) or (self.transport is None):
|
||||
return
|
||||
|
||||
extension, data = await tts.async_get_media_source_audio(
|
||||
@@ -337,15 +346,11 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
|
||||
|
||||
_LOGGER.debug("Sending %d bytes of audio", audio_bytes_size)
|
||||
|
||||
self.handle_event(
|
||||
VoiceAssistantEventType.VOICE_ASSISTANT_TTS_STREAM_START, {}
|
||||
)
|
||||
|
||||
bytes_per_sample = stt.AudioBitRates.BITRATE_16 // 8
|
||||
sample_offset = 0
|
||||
samples_left = audio_bytes_size // bytes_per_sample
|
||||
|
||||
while samples_left > 0:
|
||||
while (samples_left > 0) and self.is_running:
|
||||
bytes_offset = sample_offset * bytes_per_sample
|
||||
chunk: bytes = audio_bytes[bytes_offset : bytes_offset + 1024]
|
||||
samples_in_chunk = len(chunk) // bytes_per_sample
|
||||
|
||||
@@ -156,6 +156,7 @@ class EvoClimateEntity(EvoDevice, ClimateEntity):
|
||||
"""Base for an evohome Climate device."""
|
||||
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@property
|
||||
def hvac_modes(self) -> list[HVACMode]:
|
||||
@@ -190,7 +191,10 @@ class EvoZone(EvoChild, EvoClimateEntity):
|
||||
]
|
||||
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.PRESET_MODE | ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
ClimateEntityFeature.PRESET_MODE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
|
||||
async def async_zone_svc_request(self, service: str, data: dict[str, Any]) -> None:
|
||||
@@ -372,6 +376,9 @@ class EvoController(EvoClimateEntity):
|
||||
]
|
||||
if self._attr_preset_modes:
|
||||
self._attr_supported_features = ClimateEntityFeature.PRESET_MODE
|
||||
self._attr_supported_features |= (
|
||||
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
|
||||
async def async_tcs_svc_request(self, service: str, data: dict[str, Any]) -> None:
|
||||
"""Process a service request (system mode) for a controller.
|
||||
|
||||
@@ -126,6 +126,8 @@ async def async_setup_entry(
|
||||
class FibaroThermostat(FibaroDevice, ClimateEntity):
|
||||
"""Representation of a Fibaro Thermostat."""
|
||||
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, fibaro_device: DeviceModel) -> None:
|
||||
"""Initialize the Fibaro device."""
|
||||
super().__init__(fibaro_device)
|
||||
@@ -209,6 +211,11 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
|
||||
if mode in OPMODES_PRESET:
|
||||
self._attr_preset_modes.append(OPMODES_PRESET[mode])
|
||||
|
||||
if HVACMode.OFF in self._attr_hvac_modes and len(self._attr_hvac_modes) > 1:
|
||||
self._attr_supported_features |= (
|
||||
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""Call when entity is added to hass."""
|
||||
_LOGGER.debug(
|
||||
|
||||
@@ -69,6 +69,7 @@ class Flexit(ClimateEntity):
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, hub: ModbusHub, modbus_slave: int | None, name: str | None
|
||||
|
||||
@@ -62,13 +62,17 @@ class FlexitClimateEntity(FlexitEntity, ClimateEntity):
|
||||
]
|
||||
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.PRESET_MODE | ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
ClimateEntityFeature.PRESET_MODE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
|
||||
_attr_target_temperature_step = PRECISION_HALVES
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_max_temp = MAX_TEMP
|
||||
_attr_min_temp = MIN_TEMP
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator: FlexitCoordinator) -> None:
|
||||
"""Initialize the Flexit unit."""
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/frontend",
|
||||
"integration_type": "system",
|
||||
"quality_scale": "internal",
|
||||
"requirements": ["home-assistant-frontend==20240131.0"]
|
||||
"requirements": ["home-assistant-frontend==20240202.0"]
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ class HomeKitBaseClimateEntity(HomeKitEntity, ClimateEntity):
|
||||
"""The base HomeKit Controller climate entity."""
|
||||
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@callback
|
||||
def _async_reconfigure(self) -> None:
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["aiohomekit", "commentjson"],
|
||||
"requirements": ["aiohomekit==3.1.3"],
|
||||
"requirements": ["aiohomekit==3.1.4"],
|
||||
"zeroconf": ["_hap._tcp.local.", "_hap._udp.local."]
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
from homeassistant.helpers.aiohttp_client import (
|
||||
async_create_clientsession,
|
||||
async_get_clientsession,
|
||||
)
|
||||
|
||||
from .const import (
|
||||
_LOGGER,
|
||||
@@ -48,9 +51,12 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
||||
username = config_entry.data[CONF_USERNAME]
|
||||
password = config_entry.data[CONF_PASSWORD]
|
||||
|
||||
client = aiosomecomfort.AIOSomeComfort(
|
||||
username, password, session=async_get_clientsession(hass)
|
||||
)
|
||||
if len(hass.config_entries.async_entries(DOMAIN)) > 1:
|
||||
session = async_create_clientsession(hass)
|
||||
else:
|
||||
session = async_get_clientsession(hass)
|
||||
|
||||
client = aiosomecomfort.AIOSomeComfort(username, password, session=session)
|
||||
try:
|
||||
await client.login()
|
||||
await client.discover()
|
||||
@@ -76,7 +82,6 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
||||
if len(devices) == 0:
|
||||
_LOGGER.debug("No devices found")
|
||||
return False
|
||||
|
||||
data = HoneywellData(config_entry.entry_id, client, devices)
|
||||
hass.data.setdefault(DOMAIN, {})[config_entry.entry_id] = data
|
||||
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
|
||||
|
||||
@@ -134,12 +134,17 @@ class KNXClimate(KnxEntity, ClimateEntity):
|
||||
|
||||
_device: XknxClimate
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, xknx: XKNX, config: ConfigType) -> None:
|
||||
"""Initialize of a KNX climate device."""
|
||||
super().__init__(_create_climate(xknx, config))
|
||||
self._attr_entity_category = config.get(CONF_ENTITY_CATEGORY)
|
||||
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
if self._device.supports_on_off:
|
||||
self._attr_supported_features |= ClimateEntityFeature.TURN_OFF
|
||||
if self.preset_modes:
|
||||
self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
|
||||
self._attr_target_temperature_step = self._device.temperature_step
|
||||
|
||||
@@ -42,7 +42,7 @@ async def async_setup_entry(
|
||||
lights = []
|
||||
|
||||
for area_name, device in entry_data.lights:
|
||||
if device.type == "CEILING_FAN_TYPE2":
|
||||
if device.type == "CEILING_FAN_TYPE":
|
||||
# If this is a fan, check to see if this entity already exists.
|
||||
# If not, do not create a new one.
|
||||
entity_id = ent_reg.async_get_entity_id(
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/matrix",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["matrix_client"],
|
||||
"requirements": ["matrix-nio==0.22.1", "Pillow==10.2.0"]
|
||||
"requirements": ["matrix-nio==0.24.0", "Pillow==10.2.0"]
|
||||
}
|
||||
|
||||
@@ -73,11 +73,8 @@ class MatterClimate(MatterEntity, ClimateEntity):
|
||||
"""Representation of a Matter climate entity."""
|
||||
|
||||
_attr_temperature_unit: str = UnitOfTemperature.CELSIUS
|
||||
_attr_supported_features: ClimateEntityFeature = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||
)
|
||||
_attr_hvac_mode: HVACMode = HVACMode.OFF
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -99,6 +96,13 @@ class MatterClimate(MatterEntity, ClimateEntity):
|
||||
self._attr_hvac_modes.append(HVACMode.COOL)
|
||||
if feature_map & ThermostatFeature.kAutoMode:
|
||||
self._attr_hvac_modes.append(HVACMode.HEAT_COOL)
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
)
|
||||
if any(mode for mode in self.hvac_modes if mode != HVACMode.OFF):
|
||||
self._attr_supported_features |= ClimateEntityFeature.TURN_ON
|
||||
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperature."""
|
||||
|
||||
@@ -68,8 +68,12 @@ class MaxCubeClimate(ClimateEntity):
|
||||
|
||||
_attr_hvac_modes = [HVACMode.OFF, HVACMode.AUTO, HVACMode.HEAT]
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.PRESET_MODE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, handler, device):
|
||||
"""Initialize MAX! Cube ClimateEntity."""
|
||||
|
||||
@@ -114,6 +114,7 @@ class MelCloudClimate(ClimateEntity):
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, device: MelCloudDevice) -> None:
|
||||
"""Initialize the climate."""
|
||||
@@ -137,6 +138,8 @@ class AtaDeviceClimate(MelCloudClimate):
|
||||
ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.SWING_MODE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
|
||||
def __init__(self, device: MelCloudDevice, ata_device: AtaDevice) -> None:
|
||||
|
||||
@@ -57,9 +57,13 @@ class MelissaClimate(ClimateEntity):
|
||||
|
||||
_attr_hvac_modes = OP_MODES
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, api, serial_number, init_data):
|
||||
"""Initialize the climate device."""
|
||||
|
||||
@@ -99,6 +99,7 @@ class MillHeater(CoordinatorEntity[MillDataUpdateCoordinator], ClimateEntity):
|
||||
)
|
||||
_attr_target_temperature_step = PRECISION_TENTHS
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, coordinator: MillDataUpdateCoordinator, heater: mill.Heater
|
||||
|
||||
@@ -182,7 +182,6 @@ class BaseStructPlatform(BasePlatform, RestoreEntity):
|
||||
self._data_type = config[CONF_DATA_TYPE]
|
||||
self._structure: str = config[CONF_STRUCTURE]
|
||||
self._scale = config[CONF_SCALE]
|
||||
self._precision = config.get(CONF_PRECISION, 2)
|
||||
self._offset = config[CONF_OFFSET]
|
||||
self._slave_count = config.get(CONF_SLAVE_COUNT, None) or config.get(
|
||||
CONF_VIRTUAL_COUNT, 0
|
||||
@@ -196,11 +195,10 @@ class BaseStructPlatform(BasePlatform, RestoreEntity):
|
||||
DataType.UINT32,
|
||||
DataType.UINT64,
|
||||
)
|
||||
if self._value_is_int:
|
||||
if self._min_value:
|
||||
self._min_value = round(self._min_value)
|
||||
if self._max_value:
|
||||
self._max_value = round(self._max_value)
|
||||
if not self._value_is_int:
|
||||
self._precision = config.get(CONF_PRECISION, 2)
|
||||
else:
|
||||
self._precision = config.get(CONF_PRECISION, 0)
|
||||
|
||||
def _swap_registers(self, registers: list[int], slave_count: int) -> list[int]:
|
||||
"""Do swap as needed."""
|
||||
@@ -235,13 +233,13 @@ class BaseStructPlatform(BasePlatform, RestoreEntity):
|
||||
return None
|
||||
val: float | int = self._scale * entry + self._offset
|
||||
if self._min_value is not None and val < self._min_value:
|
||||
return str(self._min_value)
|
||||
val = self._min_value
|
||||
if self._max_value is not None and val > self._max_value:
|
||||
return str(self._max_value)
|
||||
val = self._max_value
|
||||
if self._zero_suppress is not None and abs(val) <= self._zero_suppress:
|
||||
return "0"
|
||||
if self._precision == 0 or self._value_is_int:
|
||||
return str(int(round(val, 0)))
|
||||
if self._precision == 0:
|
||||
return str(round(val))
|
||||
return f"{float(val):.{self._precision}f}"
|
||||
|
||||
def unpack_structure_result(self, registers: list[int]) -> str | None:
|
||||
|
||||
@@ -97,7 +97,12 @@ async def async_setup_platform(
|
||||
class ModbusThermostat(BaseStructPlatform, RestoreEntity, ClimateEntity):
|
||||
"""Representation of a Modbus Thermostat."""
|
||||
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -46,6 +46,7 @@ class Alpha2Climate(CoordinatorEntity[Alpha2BaseCoordinator], ClimateEntity):
|
||||
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.COOL]
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_preset_modes = [PRESET_AUTO, PRESET_DAY, PRESET_NIGHT]
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator: Alpha2BaseCoordinator, heat_area_id: str) -> None:
|
||||
"""Initialize Alpha2 ClimateEntity."""
|
||||
|
||||
@@ -610,6 +610,7 @@ class MqttClimate(MqttTemperatureControlEntity, ClimateEntity):
|
||||
_attributes_extra_blocked = MQTT_CLIMATE_ATTRIBUTES_BLOCKED
|
||||
_attr_target_temperature_low: float | None = None
|
||||
_attr_target_temperature_high: float | None = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@staticmethod
|
||||
def config_schema() -> vol.Schema:
|
||||
|
||||
@@ -70,11 +70,12 @@ class MySensorsHVAC(mysensors.device.MySensorsChildEntity, ClimateEntity):
|
||||
"""Representation of a MySensors HVAC."""
|
||||
|
||||
_attr_hvac_modes = OPERATION_LIST
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@property
|
||||
def supported_features(self) -> ClimateEntityFeature:
|
||||
"""Return the list of supported features."""
|
||||
features = ClimateEntityFeature(0)
|
||||
features = ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||
set_req = self.gateway.const.SetReq
|
||||
if set_req.V_HVAC_SPEED in self._values:
|
||||
features = features | ClimateEntityFeature.FAN_MODE
|
||||
|
||||
@@ -100,6 +100,7 @@ class ThermostatEntity(ClimateEntity):
|
||||
_attr_has_entity_name = True
|
||||
_attr_should_poll = False
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, device: Device) -> None:
|
||||
"""Initialize ThermostatEntity."""
|
||||
@@ -246,7 +247,7 @@ class ThermostatEntity(ClimateEntity):
|
||||
|
||||
def _get_supported_features(self) -> ClimateEntityFeature:
|
||||
"""Compute the bitmap of supported features from the current state."""
|
||||
features = ClimateEntityFeature(0)
|
||||
features = ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||
if HVACMode.HEAT_COOL in self.hvac_modes:
|
||||
features |= ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||
if HVACMode.HEAT in self.hvac_modes or HVACMode.COOL in self.hvac_modes:
|
||||
|
||||
@@ -190,6 +190,7 @@ class NetatmoThermostat(NetatmoBaseEntity, ClimateEntity):
|
||||
_attr_supported_features = SUPPORT_FLAGS
|
||||
_attr_target_temperature_step = PRECISION_HALVES
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, netatmo_device: NetatmoRoom) -> None:
|
||||
"""Initialize the sensor."""
|
||||
|
||||
@@ -153,6 +153,7 @@ class NexiaZone(NexiaThermostatZoneEntity, ClimateEntity):
|
||||
"""Provides Nexia Climate support."""
|
||||
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, coordinator: NexiaDataUpdateCoordinator, zone: NexiaThermostatZone
|
||||
|
||||
@@ -72,6 +72,7 @@ class NibeClimateEntity(CoordinatorEntity[Coordinator], ClimateEntity):
|
||||
_attr_target_temperature_step = 0.5
|
||||
_attr_max_temp = 35.0
|
||||
_attr_min_temp = 5.0
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -81,6 +81,7 @@ class NoboZone(ClimateEntity):
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_target_temperature_step = 1
|
||||
# Need to poll to get preset change when in HVACMode.AUTO, so can't set _attr_should_poll = False
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, zone_id, hub: nobo, override_type) -> None:
|
||||
"""Initialize the climate device."""
|
||||
|
||||
@@ -78,6 +78,7 @@ class NuHeatThermostat(CoordinatorEntity, ClimateEntity):
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_preset_modes = PRESET_MODES
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator, thermostat, temperature_unit):
|
||||
"""Initialize the thermostat."""
|
||||
|
||||
@@ -66,8 +66,13 @@ class ThermostatDevice(ClimateEntity):
|
||||
"""Interface class for the oemthermostat module."""
|
||||
|
||||
_attr_hvac_modes = SUPPORT_HVAC
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, thermostat, name):
|
||||
"""Initialize the device."""
|
||||
|
||||
@@ -84,6 +84,7 @@ class OpenThermClimate(ClimateEntity):
|
||||
_away_state_a = False
|
||||
_away_state_b = False
|
||||
_current_operation: HVACAction | None = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, gw_dev, options):
|
||||
"""Initialize the device."""
|
||||
|
||||
@@ -53,6 +53,7 @@ class AtlanticElectricalHeater(OverkizEntity, ClimateEntity):
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_translation_key = DOMAIN
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@property
|
||||
def hvac_mode(self) -> HVACMode:
|
||||
|
||||
+1
@@ -75,6 +75,7 @@ class AtlanticElectricalHeaterWithAdjustableTemperatureSetpoint(
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_translation_key = DOMAIN
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, device_url: str, coordinator: OverkizDataUpdateCoordinator
|
||||
|
||||
@@ -45,6 +45,7 @@ class AtlanticElectricalTowelDryer(OverkizEntity, ClimateEntity):
|
||||
_attr_preset_modes = [*PRESET_MODE_TO_OVERKIZ]
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_translation_key = DOMAIN
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, device_url: str, coordinator: OverkizDataUpdateCoordinator
|
||||
|
||||
+1
@@ -54,6 +54,7 @@ class AtlanticHeatRecoveryVentilation(OverkizEntity, ClimateEntity):
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_translation_key = DOMAIN
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, device_url: str, coordinator: OverkizDataUpdateCoordinator
|
||||
|
||||
@@ -83,6 +83,7 @@ class AtlanticPassAPCHeatingZone(OverkizEntity, ClimateEntity):
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_translation_key = DOMAIN
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, device_url: str, coordinator: OverkizDataUpdateCoordinator
|
||||
|
||||
@@ -30,6 +30,7 @@ class AtlanticPassAPCZoneControl(OverkizEntity, ClimateEntity):
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@property
|
||||
def hvac_mode(self) -> HVACMode:
|
||||
|
||||
+1
@@ -90,6 +90,7 @@ class HitachiAirToAirHeatPumpHLRRWIFI(OverkizEntity, ClimateEntity):
|
||||
_attr_target_temperature_step = 1.0
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_translation_key = DOMAIN
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, device_url: str, coordinator: OverkizDataUpdateCoordinator
|
||||
|
||||
+1
@@ -81,6 +81,7 @@ class SomfyHeatingTemperatureInterface(OverkizEntity, ClimateEntity):
|
||||
# Both min and max temp values have been retrieved from the Somfy Application.
|
||||
_attr_min_temp = 15.0
|
||||
_attr_max_temp = 26.0
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, device_url: str, coordinator: OverkizDataUpdateCoordinator
|
||||
|
||||
@@ -64,6 +64,7 @@ class SomfyThermostat(OverkizEntity, ClimateEntity):
|
||||
_attr_hvac_modes = [*HVAC_MODES_TO_OVERKIZ]
|
||||
_attr_preset_modes = [*PRESET_MODES_TO_OVERKIZ]
|
||||
_attr_translation_key = DOMAIN
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
# Both min and max temp values have been retrieved from the Somfy Application.
|
||||
_attr_min_temp = 15.0
|
||||
|
||||
+1
@@ -58,6 +58,7 @@ class ValveHeatingTemperatureInterface(OverkizEntity, ClimateEntity):
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_translation_key = DOMAIN
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, device_url: str, coordinator: OverkizDataUpdateCoordinator
|
||||
|
||||
@@ -60,6 +60,7 @@ class ProliphixThermostat(ClimateEntity):
|
||||
_attr_precision = PRECISION_TENTHS
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_temperature_unit = UnitOfTemperature.FAHRENHEIT
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, pdp):
|
||||
"""Initialize the thermostat."""
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
"""Diagnostics support for Proximity."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.device_tracker import ATTR_GPS, ATTR_IP, ATTR_MAC
|
||||
from homeassistant.components.diagnostics import async_redact_data
|
||||
from homeassistant.components.person import ATTR_USER_ID
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .const import DOMAIN
|
||||
from .coordinator import ProximityDataUpdateCoordinator
|
||||
|
||||
TO_REDACT = {
|
||||
ATTR_GPS,
|
||||
ATTR_IP,
|
||||
ATTR_LATITUDE,
|
||||
ATTR_LONGITUDE,
|
||||
ATTR_MAC,
|
||||
ATTR_USER_ID,
|
||||
"context",
|
||||
}
|
||||
|
||||
|
||||
async def async_get_config_entry_diagnostics(
|
||||
hass: HomeAssistant, entry: ConfigEntry
|
||||
) -> dict[str, Any]:
|
||||
"""Return diagnostics for a config entry."""
|
||||
coordinator: ProximityDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
diag_data = {
|
||||
"entry": entry.as_dict(),
|
||||
}
|
||||
|
||||
tracked_states: dict[str, dict] = {}
|
||||
for tracked_entity_id in coordinator.tracked_entities:
|
||||
if (state := hass.states.get(tracked_entity_id)) is None:
|
||||
continue
|
||||
tracked_states[tracked_entity_id] = state.as_dict()
|
||||
|
||||
diag_data["data"] = {
|
||||
"proximity": coordinator.data.proximity,
|
||||
"entities": coordinator.data.entities,
|
||||
"entity_mapping": coordinator.entity_mapping,
|
||||
"tracked_states": async_redact_data(tracked_states, TO_REDACT),
|
||||
}
|
||||
return diag_data
|
||||
@@ -106,6 +106,7 @@ class RadioThermostat(RadioThermostatEntity, ClimateEntity):
|
||||
_attr_temperature_unit = UnitOfTemperature.FAHRENHEIT
|
||||
_attr_precision = PRECISION_HALVES
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator: RadioThermUpdateCoordinator) -> None:
|
||||
"""Initialize the thermostat."""
|
||||
@@ -113,7 +114,10 @@ class RadioThermostat(RadioThermostatEntity, ClimateEntity):
|
||||
self._attr_unique_id = self.init_data.mac
|
||||
self._attr_fan_modes = CT30_FAN_OPERATION_LIST
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
if not isinstance(self.device, radiotherm.thermostat.CT80):
|
||||
return
|
||||
|
||||
@@ -794,4 +794,6 @@ def purge_entity_data(
|
||||
_LOGGER.debug("Purging entity data hasn't fully completed yet")
|
||||
return False
|
||||
|
||||
_purge_old_entity_ids(instance, session)
|
||||
|
||||
return True
|
||||
|
||||
@@ -81,6 +81,7 @@ class SchluterThermostat(CoordinatorEntity, ClimateEntity):
|
||||
_attr_hvac_modes = [HVACMode.HEAT]
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator, serial_number, api, session_id):
|
||||
"""Initialize the thermostat."""
|
||||
|
||||
@@ -81,8 +81,12 @@ class ScreenLogicClimate(ScreenLogicPushEntity, ClimateEntity, RestoreEntity):
|
||||
entity_description: ScreenLogicClimateDescription
|
||||
_attr_hvac_modes = SUPPORTED_MODES
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.PRESET_MODE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator, entity_description) -> None:
|
||||
"""Initialize a ScreenLogic climate entity."""
|
||||
|
||||
@@ -191,6 +191,7 @@ class SensiboClimate(SensiboDeviceBaseEntity, ClimateEntity):
|
||||
_attr_name = None
|
||||
_attr_precision = PRECISION_TENTHS
|
||||
_attr_translation_key = "climate_device"
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, coordinator: SensiboDataUpdateCoordinator, device_id: str
|
||||
|
||||
@@ -45,6 +45,7 @@ class SENZClimate(CoordinatorEntity, ClimateEntity):
|
||||
_attr_min_temp = 5
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -167,6 +167,7 @@ class BlockSleepingClimate(
|
||||
)
|
||||
_attr_target_temperature_step = SHTRV_01_TEMPERATURE_SETTINGS["step"]
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -448,6 +449,7 @@ class RpcClimate(ShellyRpcEntity, ClimateEntity):
|
||||
)
|
||||
_attr_target_temperature_step = RPC_THERMOSTAT_SETTINGS["step"]
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator: ShellyRpcCoordinator, id_: int) -> None:
|
||||
"""Initialize."""
|
||||
|
||||
@@ -162,6 +162,8 @@ def get_capabilities(capabilities: Sequence[str]) -> Sequence[str] | None:
|
||||
class SmartThingsThermostat(SmartThingsEntity, ClimateEntity):
|
||||
"""Define a SmartThings climate entities."""
|
||||
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, device):
|
||||
"""Init the class."""
|
||||
super().__init__(device)
|
||||
@@ -343,6 +345,7 @@ class SmartThingsAirConditioner(SmartThingsEntity, ClimateEntity):
|
||||
"""Define a SmartThings Air Conditioner."""
|
||||
|
||||
_hvac_modes: list[HVACMode]
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, device) -> None:
|
||||
"""Init the class."""
|
||||
|
||||
@@ -67,6 +67,7 @@ class SmartTubThermostat(SmartTubEntity, ClimateEntity):
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_preset_modes = list(PRESET_MODES.values())
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, coordinator, spa):
|
||||
"""Initialize the entity."""
|
||||
|
||||
@@ -76,6 +76,10 @@ class SonosEntity(Entity):
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return information about the device."""
|
||||
suggested_area: str | None = None
|
||||
if not self.speaker.battery_info:
|
||||
# Only set suggested area for non-portable devices
|
||||
suggested_area = self.speaker.zone_name
|
||||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, self.soco.uid)},
|
||||
name=self.speaker.zone_name,
|
||||
@@ -86,7 +90,7 @@ class SonosEntity(Entity):
|
||||
(dr.CONNECTION_UPNP, f"uuid:{self.speaker.uid}"),
|
||||
},
|
||||
manufacturer="Sonos",
|
||||
suggested_area=self.speaker.zone_name,
|
||||
suggested_area=suggested_area,
|
||||
configuration_url=f"http://{self.soco.ip_address}:1400/support/review",
|
||||
)
|
||||
|
||||
|
||||
@@ -73,9 +73,13 @@ class StiebelEltron(ClimateEntity):
|
||||
|
||||
_attr_hvac_modes = SUPPORT_HVAC
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.PRESET_MODE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, name, ste_data):
|
||||
"""Initialize the unit."""
|
||||
|
||||
@@ -89,7 +89,9 @@ async def async_migrate_entry(
|
||||
device_registry, config_entry_id=config_entry.entry_id
|
||||
)
|
||||
for dev in device_entries:
|
||||
device_registry.async_remove_device(dev.id)
|
||||
device_registry.async_update_device(
|
||||
dev.id, remove_config_entry_id=config_entry.entry_id
|
||||
)
|
||||
|
||||
entity_id = entity_registry.async_get_entity_id(
|
||||
Platform.SENSOR, DOMAIN, "None_departure"
|
||||
@@ -105,12 +107,13 @@ async def async_migrate_entry(
|
||||
)
|
||||
|
||||
# Set a valid unique id for config entries
|
||||
config_entry.unique_id = new_unique_id
|
||||
config_entry.minor_version = 2
|
||||
hass.config_entries.async_update_entry(config_entry)
|
||||
hass.config_entries.async_update_entry(config_entry, unique_id=new_unique_id)
|
||||
|
||||
_LOGGER.debug(
|
||||
"Migration to minor version %s successful", config_entry.minor_version
|
||||
"Migration to version %s.%s successful",
|
||||
config_entry.version,
|
||||
config_entry.minor_version,
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
@@ -80,6 +80,7 @@ class SwitchBotCloudAirConditionner(SwitchBotCloudEntity, ClimateEntity):
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_target_temperature = 21
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
async def _do_send_command(
|
||||
self,
|
||||
|
||||
@@ -131,7 +131,10 @@ def create_climate_entity(tado, name: str, zone_id: int, device_info: dict):
|
||||
|
||||
zone_type = capabilities["type"]
|
||||
support_flags = (
|
||||
ClimateEntityFeature.PRESET_MODE | ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
ClimateEntityFeature.PRESET_MODE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
supported_hvac_modes = [
|
||||
TADO_TO_HA_HVAC_MODE_MAP[CONST_MODE_OFF],
|
||||
@@ -221,6 +224,7 @@ class TadoClimate(TadoZoneEntity, ClimateEntity):
|
||||
_attr_name = None
|
||||
_attr_translation_key = DOMAIN
|
||||
_available = False
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Diagnostics support for Tankerkoenig."""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import asdict
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.diagnostics import async_redact_data
|
||||
@@ -27,6 +28,9 @@ async def async_get_config_entry_diagnostics(
|
||||
|
||||
diag_data = {
|
||||
"entry": async_redact_data(entry.as_dict(), TO_REDACT),
|
||||
"data": coordinator.data,
|
||||
"data": {
|
||||
station_id: asdict(price_info)
|
||||
for station_id, price_info in coordinator.data.items()
|
||||
},
|
||||
}
|
||||
return diag_data
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/tankerkoenig",
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["aiotankerkoenig"],
|
||||
"requirements": ["aiotankerkoenig==0.2.0"]
|
||||
"requirements": ["aiotankerkoenig==0.3.0"]
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
"safety": "[%key:component::binary_sensor::entity_component::safety::name%]",
|
||||
"smoke": "[%key:component::binary_sensor::entity_component::smoke::name%]",
|
||||
"sound": "[%key:component::binary_sensor::entity_component::sound::name%]",
|
||||
"tamper": "[%key:component::binary_sensor::entity_component::tamper::name%]",
|
||||
"update": "[%key:component::binary_sensor::entity_component::update::name%]",
|
||||
"vibration": "[%key:component::binary_sensor::entity_component::vibration::name%]",
|
||||
"window": "[%key:component::binary_sensor::entity_component::window::name%]"
|
||||
@@ -127,6 +128,7 @@
|
||||
"volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]",
|
||||
"voltage": "[%key:component::sensor::entity_component::voltage::name%]",
|
||||
"volume": "[%key:component::sensor::entity_component::volume::name%]",
|
||||
"volume_flow_rate": "[%key:component::sensor::entity_component::volume_flow_rate::name%]",
|
||||
"volume_storage": "[%key:component::sensor::entity_component::volume_storage::name%]",
|
||||
"water": "[%key:component::sensor::entity_component::water::name%]",
|
||||
"weight": "[%key:component::sensor::entity_component::weight::name%]",
|
||||
|
||||
@@ -45,6 +45,7 @@ class TeslemetryClimateEntity(TeslemetryVehicleEntity, ClimateEntity):
|
||||
| ClimateEntityFeature.PRESET_MODE
|
||||
)
|
||||
_attr_preset_modes = ["off", "keep", "dog", "camp"]
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@property
|
||||
def hvac_mode(self) -> HVACMode | None:
|
||||
|
||||
@@ -56,6 +56,7 @@ class TessieClimateEntity(TessieEntity, ClimateEntity):
|
||||
TessieClimateKeeper.DOG,
|
||||
TessieClimateKeeper.CAMP,
|
||||
]
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -83,8 +83,11 @@ class TfiacClimate(ClimateEntity):
|
||||
ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.SWING_MODE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.FAHRENHEIT
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, hass, client):
|
||||
"""Init class."""
|
||||
|
||||
@@ -58,6 +58,7 @@ class SaunaClimate(ToloSaunaCoordinatorEntity, ClimateEntity):
|
||||
)
|
||||
_attr_target_temperature_step = 1
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, coordinator: ToloSaunaUpdateCoordinator, entry: ConfigEntry
|
||||
|
||||
@@ -51,6 +51,7 @@ class ToonThermostatDevice(ToonDisplayDeviceEntity, ClimateEntity):
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -69,6 +69,7 @@ class Touchline(ClimateEntity):
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, touchline_thermostat):
|
||||
"""Initialize the Touchline device."""
|
||||
|
||||
@@ -156,6 +156,10 @@
|
||||
"hostname": "k[lps]*",
|
||||
"macaddress": "54AF97*"
|
||||
},
|
||||
{
|
||||
"hostname": "l[59]*",
|
||||
"macaddress": "54AF97*"
|
||||
},
|
||||
{
|
||||
"hostname": "k[lps]*",
|
||||
"macaddress": "AC15A2*"
|
||||
@@ -177,21 +181,41 @@
|
||||
"macaddress": "5CE931*"
|
||||
},
|
||||
{
|
||||
"hostname": "l5*",
|
||||
"hostname": "l[59]*",
|
||||
"macaddress": "3C52A1*"
|
||||
},
|
||||
{
|
||||
"hostname": "l5*",
|
||||
"macaddress": "5C628B*"
|
||||
},
|
||||
{
|
||||
"hostname": "tp*",
|
||||
"macaddress": "5C628B*"
|
||||
},
|
||||
{
|
||||
"hostname": "p1*",
|
||||
"macaddress": "482254*"
|
||||
},
|
||||
{
|
||||
"hostname": "s5*",
|
||||
"macaddress": "482254*"
|
||||
},
|
||||
{
|
||||
"hostname": "p1*",
|
||||
"macaddress": "30DE4B*"
|
||||
},
|
||||
{
|
||||
"hostname": "p1*",
|
||||
"macaddress": "3C52A1*"
|
||||
},
|
||||
{
|
||||
"hostname": "tp*",
|
||||
"macaddress": "3C52A1*"
|
||||
},
|
||||
{
|
||||
"hostname": "s5*",
|
||||
"macaddress": "3C52A1*"
|
||||
},
|
||||
{
|
||||
"hostname": "l9*",
|
||||
"macaddress": "A842A1*"
|
||||
@@ -199,11 +223,51 @@
|
||||
{
|
||||
"hostname": "l9*",
|
||||
"macaddress": "3460F9*"
|
||||
},
|
||||
{
|
||||
"hostname": "hs*",
|
||||
"macaddress": "704F57*"
|
||||
},
|
||||
{
|
||||
"hostname": "k[lps]*",
|
||||
"macaddress": "74DA88*"
|
||||
},
|
||||
{
|
||||
"hostname": "p3*",
|
||||
"macaddress": "788CB5*"
|
||||
},
|
||||
{
|
||||
"hostname": "p1*",
|
||||
"macaddress": "CC32E5*"
|
||||
},
|
||||
{
|
||||
"hostname": "k[lps]*",
|
||||
"macaddress": "CC32E5*"
|
||||
},
|
||||
{
|
||||
"hostname": "hs*",
|
||||
"macaddress": "CC32E5*"
|
||||
},
|
||||
{
|
||||
"hostname": "k[lps]*",
|
||||
"macaddress": "D80D17*"
|
||||
},
|
||||
{
|
||||
"hostname": "k[lps]*",
|
||||
"macaddress": "D84732*"
|
||||
},
|
||||
{
|
||||
"hostname": "p1*",
|
||||
"macaddress": "F0A731*"
|
||||
},
|
||||
{
|
||||
"hostname": "l9*",
|
||||
"macaddress": "F0A731*"
|
||||
}
|
||||
],
|
||||
"documentation": "https://www.home-assistant.io/integrations/tplink",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["kasa"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["python-kasa[speedups]==0.6.2"]
|
||||
"requirements": ["python-kasa[speedups]==0.6.2.1"]
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"config_flow": true,
|
||||
"dependencies": ["webhook"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/traccar",
|
||||
"iot_class": "local_polling",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["pytraccar"],
|
||||
"requirements": ["pytraccar==2.0.0", "stringcase==1.2.0"]
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ class VelbusClimate(VelbusEntity, ClimateEntity):
|
||||
_attr_hvac_mode = HVACMode.HEAT
|
||||
_attr_hvac_modes = [HVACMode.HEAT]
|
||||
_attr_preset_modes = list(PRESET_MODES)
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
@property
|
||||
def target_temperature(self) -> float | None:
|
||||
|
||||
@@ -108,6 +108,7 @@ class VenstarThermostat(VenstarEntity, ClimateEntity):
|
||||
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.COOL, HVACMode.OFF, HVACMode.AUTO]
|
||||
_attr_precision = PRECISION_HALVES
|
||||
_attr_name = None
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -130,6 +131,8 @@ class VenstarThermostat(VenstarEntity, ClimateEntity):
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.PRESET_MODE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
|
||||
if self._client.mode == self._client.MODE_AUTO:
|
||||
|
||||
@@ -53,6 +53,7 @@ class VeraThermostat(VeraDevice[veraApi.VeraThermostat], ClimateEntity):
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self, vera_device: veraApi.VeraThermostat, controller_data: ControllerData
|
||||
|
||||
@@ -58,7 +58,6 @@ class VerisureDoorWindowSensor(
|
||||
area = self.coordinator.data["door_window"][self.serial_number]["area"]
|
||||
return DeviceInfo(
|
||||
name=area,
|
||||
suggested_area=area,
|
||||
manufacturer="Verisure",
|
||||
model="Shock Sensor Detector",
|
||||
identifiers={(DOMAIN, self.serial_number)},
|
||||
|
||||
@@ -71,7 +71,6 @@ class VerisureSmartcam(CoordinatorEntity[VerisureDataUpdateCoordinator], Camera)
|
||||
area = self.coordinator.data["cameras"][self.serial_number]["device"]["area"]
|
||||
return DeviceInfo(
|
||||
name=area,
|
||||
suggested_area=area,
|
||||
manufacturer="Verisure",
|
||||
model="SmartCam",
|
||||
identifiers={(DOMAIN, self.serial_number)},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user