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
2 changes: 1 addition & 1 deletion .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ jobs:

- name: Generate artifact attestation
if: needs.init.outputs.channel != 'dev' && needs.init.outputs.publish == 'true'
uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
with:
subject-name: ${{ env.HASSFEST_IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
Expand Down
16 changes: 8 additions & 8 deletions homeassistant/components/music_assistant/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ async def async_step_user(
async def async_step_hassio(
self, discovery_info: HassioServiceInfo
) -> ConfigFlowResult:
"""Handle Home Assistant add-on discovery.
"""Handle Home Assistant app discovery.

This flow is triggered by the Music Assistant add-on.
This flow is triggered by the Music Assistant app.
"""
# Build URL from add-on discovery info
# The add-on exposes the API on port 8095, but also hosts an internal-only
# Build URL from app discovery info
# The app exposes the API on port 8095, but also hosts an internal-only
# webserver (default at port 8094) for the Home Assistant integration to connect to.
# The info where the internal API is exposed is passed via discovery_info
host = discovery_info.config["host"]
Expand All @@ -160,7 +160,7 @@ async def async_step_hassio(
except InvalidServerVersion:
return self.async_abort(reason="invalid_server_version")
except MusicAssistantClientException:
LOGGER.exception("Unexpected exception during add-on discovery")
LOGGER.exception("Unexpected exception during HA app discovery")
return self.async_abort(reason="unknown")

# We trust the token from hassio discovery and validate it during setup
Expand Down Expand Up @@ -191,7 +191,7 @@ async def async_step_hassio(
async def async_step_hassio_confirm(
self, user_input: dict[str, Any] | None = None
) -> ConfigFlowResult:
"""Confirm the add-on discovery."""
"""Confirm the Home Assistant app discovery."""
if TYPE_CHECKING:
assert self.url is not None

Expand All @@ -218,10 +218,10 @@ async def async_step_zeroconf(
return self.async_abort(reason="invalid_discovery_info")

if server_info.schema_version >= HASSIO_DISCOVERY_SCHEMA_VERSION:
# Ignore servers running as Home Assistant add-on
# Ignore servers running as Home Assistant app
# (they should be discovered through hassio discovery instead)
if server_info.homeassistant_addon:
LOGGER.debug("Ignoring add-on server in zeroconf discovery")
LOGGER.debug("Ignoring HA app server in zeroconf discovery")
return self.async_abort(reason="already_discovered_addon")

self.url = server_info.base_url
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/music_assistant/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"hassio_confirm": {
"description": "Do you want to add the Music Assistant server to Home Assistant?",
"title": "Discovered Music Assistant add-on"
"title": "Discovered Music Assistant app"
},
"reauth_confirm": {
"description": "The authentication token for Music Assistant server `{url}` is no longer valid. Please re-authenticate to continue using the integration.",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/reolink/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"iot_class": "local_push",
"loggers": ["reolink_aio"],
"quality_scale": "platinum",
"requirements": ["reolink-aio==0.18.0"]
"requirements": ["reolink-aio==0.18.1"]
}
11 changes: 9 additions & 2 deletions homeassistant/components/reolink/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,12 @@
"animal_type": {
"name": "Animal type",
"state": {
"bear": "Bear",
"cat": "Cat",
"dog": "Dog"
"cow": "Cow",
"dog": "Dog",
"fox": "Fox",
"squirrel": "Squirrel"
}
},
"battery_state": {
Expand Down Expand Up @@ -850,6 +854,7 @@
"person_type": {
"name": "Person type",
"state": {
"child": "Child",
"man": "Man",
"woman": "Woman"
}
Expand All @@ -870,7 +875,9 @@
"motorcycle": "Motorcycle",
"pickup_truck": "Pickup truck",
"sedan": "Sedan",
"suv": "SUV"
"suv": "SUV",
"truck": "Truck",
"van": "Van"
}
},
"wifi_signal": {
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion requirements_test_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions tests/components/fritz/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@ def __init__(self, serviceId: str, actions: dict) -> None:
self.serviceId = serviceId


class FritzResponseMock:
"""Response mocking."""

def json(self):
"""Mock json method."""
return {"CPUTEMP": "69,68,67"}


class FritzHttpMock:
"""FritzHttp mocking."""

def __init__(self) -> None:
"""Init Mocking class."""
self.router_url = "http://fritz.box"

def call_url(self, *args, **kwargs):
"""Mock call_url method."""
return FritzResponseMock()


class FritzConnectionMock:
"""FritzConnection mocking."""

Expand All @@ -64,7 +44,6 @@ def __init__(self, services) -> None:
srv: FritzServiceMock(serviceId=srv, actions=actions)
for srv, actions in services.items()
}
self.http_interface = FritzHttpMock()
LOGGER.debug("-" * 80)
LOGGER.debug("FritzConnectionMock - services: %s", self.services)

Expand Down
5 changes: 2 additions & 3 deletions tests/components/fritz/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
]),
'connection_type': 'WANPPPConnection',
'cpu_temperatures': list([
69,
68,
67,
42,
38,
]),
'current_firmware': '7.29',
'current_user_rights': dict({
Expand Down
114 changes: 57 additions & 57 deletions tests/components/fritz/snapshots/test_sensor.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,63 @@
'state': '2024-09-01T10:11:33+00:00',
})
# ---
# name: test_sensor_setup[sensor.mock_title_cpu_temperature-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.mock_title_cpu_temperature',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'CPU temperature',
'options': dict({
'sensor': dict({
'suggested_display_precision': 1,
}),
}),
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
'original_icon': None,
'original_name': 'CPU temperature',
'platform': 'fritz',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'cpu_temperature',
'unique_id': '1C:ED:6F:12:34:11-cpu_temperature',
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
})
# ---
# name: test_sensor_setup[sensor.mock_title_cpu_temperature-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'temperature',
'friendly_name': 'Mock Title CPU temperature',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
}),
'context': <ANY>,
'entity_id': 'sensor.mock_title_cpu_temperature',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '42',
})
# ---
# name: test_sensor_setup[sensor.mock_title_download_throughput-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
Expand Down Expand Up @@ -841,60 +898,3 @@
'state': '3.4',
})
# ---
# name: test_sensor_setup[sensor.mock_title_cpu_temperature-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.mock_title_cpu_temperature',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'CPU temperature',
'options': dict({
'sensor': dict({
'suggested_display_precision': 1,
}),
}),
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
'original_icon': None,
'original_name': 'CPU temperature',
'platform': 'fritz',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'cpu_temperature',
'unique_id': '1C:ED:6F:12:34:11-cpu_temperature',
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
})
# ---
# name: test_sensor_setup[sensor.mock_title_cpu_temperature-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'temperature',
'friendly_name': 'Mock Title CPU temperature',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
}),
'context': <ANY>,
'entity_id': 'sensor.mock_title_cpu_temperature',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '69',
})
# ---
2 changes: 1 addition & 1 deletion tests/components/fritz/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ async def test_ssdp_exception(hass: HomeAssistant) -> None:
assert result["step_id"] == "confirm"


async def test_options_flow(hass: HomeAssistant) -> None:
async def test_options_flow(hass: HomeAssistant, fc_class_mock) -> None:
"""Test options flow."""

mock_config = MockConfigEntry(domain=DOMAIN, data=MOCK_USER_DATA)
Expand Down
1 change: 1 addition & 0 deletions tests/components/fritz/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ async def test_entry_diagnostics(
hass_client: ClientSessionGenerator,
fc_class_mock,
fh_class_mock,
fs_class_mock,
snapshot: SnapshotAssertion,
) -> None:
"""Test config entry diagnostics."""
Expand Down
1 change: 1 addition & 0 deletions tests/components/fritz/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ async def test_sensor_setup(
entity_registry: er.EntityRegistry,
fc_class_mock,
fh_class_mock,
fs_class_mock,
snapshot: SnapshotAssertion,
) -> None:
"""Test setup of Fritz!Tools sensors."""
Expand Down
Loading