Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add humidity tracking to Venstar component #134936

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
10 changes: 5 additions & 5 deletions homeassistant/components/abode/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
"services": {
"capture_image": {
"name": "Capture image",
"description": "Request a new image capture from a camera device.",
"description": "Requests a new image capture from a camera device.",
"fields": {
"entity_id": {
"name": "Entity",
"description": "Entity id of the camera to request an image."
"description": "Entity ID of the camera to request an image from."
}
}
},
"change_setting": {
"name": "Change setting",
"description": "Change an Abode system setting.",
"description": "Changes an Abode system setting.",
"fields": {
"setting": {
"name": "Setting",
Expand All @@ -58,11 +58,11 @@
},
"trigger_automation": {
"name": "Trigger automation",
"description": "Trigger an Abode automation.",
"description": "Triggers an Abode automation.",
"fields": {
"entity_id": {
"name": "Entity",
"description": "Entity id of the automation to trigger."
"description": "Entity ID of the automation to trigger."
}
}
}
Expand Down
26 changes: 21 additions & 5 deletions homeassistant/components/camera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,19 @@ def supported_features(self) -> CameraEntityFeature:
"""Flag supported features."""
return self._attr_supported_features

@property
def supported_features_compat(self) -> CameraEntityFeature:
"""Return the supported features as CameraEntityFeature.

Remove this compatibility shim in 2025.1 or later.
"""
features = self.supported_features
if type(features) is int: # noqa: E721
new_features = CameraEntityFeature(features)
self._report_deprecated_supported_features_values(new_features)
return new_features
return features

@cached_property
def is_recording(self) -> bool:
"""Return true if the device is recording."""
Expand Down Expand Up @@ -569,7 +582,7 @@ def frontend_stream_type(self) -> StreamType | None:

self._deprecate_attr_frontend_stream_type_logged = True
return self._attr_frontend_stream_type
if CameraEntityFeature.STREAM not in self.supported_features:
if CameraEntityFeature.STREAM not in self.supported_features_compat:
return None
if (
self._webrtc_provider
Expand Down Expand Up @@ -798,7 +811,9 @@ def async_update_token(self) -> None:
async def async_internal_added_to_hass(self) -> None:
"""Run when entity about to be added to hass."""
await super().async_internal_added_to_hass()
self.__supports_stream = self.supported_features & CameraEntityFeature.STREAM
self.__supports_stream = (
self.supported_features_compat & CameraEntityFeature.STREAM
)
await self.async_refresh_providers(write_state=False)

async def async_refresh_providers(self, *, write_state: bool = True) -> None:
Expand Down Expand Up @@ -838,7 +853,7 @@ async def _async_get_supported_webrtc_provider[_T](
self, fn: Callable[[HomeAssistant, Camera], Coroutine[None, None, _T | None]]
) -> _T | None:
"""Get first provider that supports this camera."""
if CameraEntityFeature.STREAM not in self.supported_features:
if CameraEntityFeature.STREAM not in self.supported_features_compat:
return None

return await fn(self.hass, self)
Expand Down Expand Up @@ -896,7 +911,7 @@ def _invalidate_camera_capabilities_cache(self) -> None:
def camera_capabilities(self) -> CameraCapabilities:
"""Return the camera capabilities."""
frontend_stream_types = set()
if CameraEntityFeature.STREAM in self.supported_features:
if CameraEntityFeature.STREAM in self.supported_features_compat:
if self._supports_native_sync_webrtc or self._supports_native_async_webrtc:
# The camera has a native WebRTC implementation
frontend_stream_types.add(StreamType.WEB_RTC)
Expand All @@ -916,7 +931,8 @@ def async_write_ha_state(self) -> None:
"""
super().async_write_ha_state()
if self.__supports_stream != (
supports_stream := self.supported_features & CameraEntityFeature.STREAM
supports_stream := self.supported_features_compat
& CameraEntityFeature.STREAM
):
self.__supports_stream = supports_stream
self._invalidate_camera_capabilities_cache()
Expand Down
4 changes: 4 additions & 0 deletions homeassistant/components/climate/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class HVACMode(StrEnum):
# Device is in Dry/Humidity mode
DRY = "dry"

# Device is in Humidify mode
HUMIDIFY = "humidify"
Copy link
Member

@MartinHjelmare MartinHjelmare Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the climate entity model.

Humidifying is represented by the humidifier entity in Home Assistant, not a climate entity.

https://developers.home-assistant.io/docs/core/entity/humidifier


# Only the fan is on, not fan and another mode like cool
FAN_ONLY = "fan_only"

Expand Down Expand Up @@ -91,6 +94,7 @@ class HVACAction(StrEnum):
IDLE = "idle"
OFF = "off"
PREHEATING = "preheating"
HUMIDIFYING = "humidifying"


CURRENT_HVAC_ACTIONS = [cls.value for cls in HVACAction]
Expand Down
6 changes: 5 additions & 1 deletion homeassistant/components/cloud/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ async def async_download_backup(
raise BackupAgentError("Failed to get download details") from err

try:
resp = await self._cloud.websession.get(details["url"])
resp = await self._cloud.websession.get(
details["url"],
timeout=ClientTimeout(connect=10.0, total=43200.0), # 43200s == 12h
)

resp.raise_for_status()
except ClientError as err:
raise BackupAgentError("Failed to download backup") from err
Expand Down
4 changes: 4 additions & 0 deletions homeassistant/components/cover/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ def state_attributes(self) -> dict[str, Any]:
def supported_features(self) -> CoverEntityFeature:
"""Flag supported features."""
if (features := self._attr_supported_features) is not None:
if type(features) is int: # noqa: E721
new_features = CoverEntityFeature(features)
self._report_deprecated_supported_features_values(new_features)
return new_features
return features

supported_features = (
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/dsmr/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ def rename_old_gas_to_mbus(
ent_reg.async_update_entity(
entity.entity_id,
new_unique_id=mbus_device_id,
device_id=mbus_device_id,
)
except ValueError:
LOGGER.debug(
Expand Down
14 changes: 6 additions & 8 deletions homeassistant/components/heos/quality_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rules:
docs-actions: done
docs-high-level-description: done
docs-installation-instructions: done
docs-removal-instructions: todo
docs-removal-instructions: done
entity-event-setup: done
entity-unique-id: done
has-entity-name: done
Expand Down Expand Up @@ -60,14 +60,12 @@ rules:
status: todo
comment: Explore if this is possible.
discovery: done
docs-data-update: todo
docs-examples: todo
docs-known-limitations: todo
docs-supported-devices: todo
docs-data-update: done
docs-examples: done
docs-known-limitations: done
docs-supported-devices: done
docs-supported-functions: done
docs-troubleshooting:
status: todo
comment: Has some troublehsooting setps, but needs to be improved
docs-troubleshooting: done
docs-use-cases: done
dynamic-devices: todo
entity-category: done
Expand Down
18 changes: 9 additions & 9 deletions homeassistant/components/knx/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"step": {
"connection_type": {
"title": "KNX connection",
"description": "'Automatic' performs a gateway scan on start, to find a KNX IP interface. It will connect via a tunnel. (Not available if a gateway scan was not successful.) \n\n 'Tunneling' will connect to a specific KNX IP interface over a tunnel. \n\n 'Routing' will use Multicast to communicate with KNX IP routers.",
"description": "'Automatic' performs a gateway scan on start, to find a KNX IP interface. It will connect via a tunnel. (Not available if a gateway scan was not successful.)\n\n'Tunneling' will connect to a specific KNX IP interface over a tunnel.\n\n'Routing' will use Multicast to communicate with KNX IP routers.",
"data": {
"connection_type": "KNX Connection Type"
"connection_type": "KNX connection type"
},
"data_description": {
"connection_type": "Please select the connection type you want to use for your KNX connection."
Expand Down Expand Up @@ -33,7 +33,7 @@
"title": "Tunnel settings",
"description": "Please enter the connection information of your tunneling device.",
"data": {
"tunneling_type": "KNX Tunneling Type",
"tunneling_type": "KNX tunneling type",
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]",
"route_back": "Route back / NAT mode",
Expand All @@ -48,19 +48,19 @@
}
},
"secure_key_source_menu_tunnel": {
"title": "KNX IP-Secure",
"title": "KNX IP Secure",
"description": "How do you want to configure KNX/IP Secure?",
"menu_options": {
"secure_knxkeys": "Use a `.knxkeys` file providing IP secure keys",
"secure_tunnel_manual": "Configure IP secure credentials manually"
"secure_knxkeys": "Use a `.knxkeys` file providing IP Secure keys",
"secure_tunnel_manual": "Configure IP Secure credentials manually"
}
},
"secure_key_source_menu_routing": {
"title": "[%key:component::knx::config::step::secure_key_source_menu_tunnel::title%]",
"description": "[%key:component::knx::config::step::secure_key_source_menu_tunnel::description%]",
"menu_options": {
"secure_knxkeys": "[%key:component::knx::config::step::secure_key_source_menu_tunnel::menu_options::secure_knxkeys%]",
"secure_routing_manual": "Configure IP secure backbone key manually"
"secure_routing_manual": "Configure IP Secure backbone key manually"
}
},
"secure_knxkeys": {
Expand All @@ -86,7 +86,7 @@
},
"secure_tunnel_manual": {
"title": "Secure tunnelling",
"description": "Please enter your IP secure information.",
"description": "Please enter your IP Secure information.",
"data": {
"user_id": "User ID",
"user_password": "User password",
Expand Down Expand Up @@ -443,7 +443,7 @@
},
"entity_id": {
"name": "Entity",
"description": "Entity id whose state or attribute shall be exposed."
"description": "Entity ID whose state or attribute shall be exposed."
},
"attribute": {
"name": "Entity attribute",
Expand Down
Loading