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
4 changes: 2 additions & 2 deletions CODEOWNERS

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

3 changes: 2 additions & 1 deletion homeassistant/components/cast/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import logging
import threading

import pychromecast
import pychromecast.discovery
import pychromecast.models

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
Expand Down
5 changes: 4 additions & 1 deletion homeassistant/components/cast/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@

import aiohttp
import attr
import pychromecast
from pychromecast import dial
from pychromecast.const import CAST_TYPE_GROUP
import pychromecast.controllers.media
import pychromecast.controllers.multizone
import pychromecast.controllers.receiver
from pychromecast.models import CastInfo
import pychromecast.socket_client

from homeassistant.core import HomeAssistant
from homeassistant.helpers import aiohttp_client
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/cast/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
import logging
from typing import TYPE_CHECKING, Any, Concatenate

import pychromecast
import pychromecast.config
import pychromecast.const
from pychromecast.controllers.homeassistant import HomeAssistantController
import pychromecast.controllers.media
from pychromecast.controllers.media import (
MEDIA_PLAYER_ERROR_CODES,
MEDIA_PLAYER_STATE_BUFFERING,
Expand Down
35 changes: 24 additions & 11 deletions homeassistant/components/husqvarna_automower_ble/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from automower_ble.protocol import ResponseResult
from bleak import BleakError
from bleak_retry_connector import get_device
from gardena_bluetooth.const import ScanService
from gardena_bluetooth.parse import ManufacturerData, ProductType
import voluptuous as vol

from homeassistant.components import bluetooth
Expand All @@ -22,20 +24,31 @@

def _is_supported(discovery_info: BluetoothServiceInfo):
"""Check if device is supported."""
if ScanService not in discovery_info.service_uuids:
LOGGER.debug(
"Unsupported device, missing service %s: %s", ScanService, discovery_info
)
return False

LOGGER.debug(
"%s manufacturer data: %s",
discovery_info.address,
discovery_info.manufacturer_data,
)
if not (data := discovery_info.manufacturer_data.get(ManufacturerData.company)):
LOGGER.debug(
"Unsupported device, missing manufacturer data %s: %s",
ManufacturerData.company,
discovery_info,
)
return False

manufacturer = any(key == 1062 for key in discovery_info.manufacturer_data)
service_husqvarna = any(
service == "98bd0001-0b0e-421a-84e5-ddbf75dc6de4"
for service in discovery_info.service_uuids
)
manufacturer_data = ManufacturerData.decode(data)
product_type = ProductType.from_manufacturer_data(manufacturer_data)

return manufacturer and service_husqvarna
# Some mowers only expose the serial number in the manufacturer data
# and not the product type, so we allow None here as well.
if product_type not in (ProductType.MOWER, None):
LOGGER.debug("Unsupported device: %s (%s)", manufacturer_data, discovery_info)
return False

LOGGER.debug("Supported device: %s", manufacturer_data)
return True


def _pin_valid(pin: str) -> bool:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"dependencies": ["bluetooth_adapters"],
"documentation": "https://www.home-assistant.io/integrations/husqvarna_automower_ble",
"iot_class": "local_polling",
"requirements": ["automower-ble==0.2.7"]
"requirements": ["automower-ble==0.2.7", "gardena-bluetooth==1.6.0"]
}
35 changes: 35 additions & 0 deletions homeassistant/components/lawn_mower/intent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""Intents for the lawn mower integration."""

from homeassistant.core import HomeAssistant
from homeassistant.helpers import intent

from . import DOMAIN, SERVICE_DOCK, SERVICE_START_MOWING

INTENT_LANW_MOWER_START_MOWING = "HassLawnMowerStartMowing"
INTENT_LANW_MOWER_DOCK = "HassLawnMowerDock"


async def async_setup_intents(hass: HomeAssistant) -> None:
"""Set up the lawn mower intents."""
intent.async_register(
hass,
intent.ServiceIntentHandler(
INTENT_LANW_MOWER_START_MOWING,
DOMAIN,
SERVICE_START_MOWING,
description="Starts a lawn mower",
required_domains={DOMAIN},
platforms={DOMAIN},
),
)
intent.async_register(
hass,
intent.ServiceIntentHandler(
INTENT_LANW_MOWER_DOCK,
DOMAIN,
SERVICE_DOCK,
description="Sends a lawn mower to dock",
required_domains={DOMAIN},
platforms={DOMAIN},
),
)
7 changes: 7 additions & 0 deletions homeassistant/components/lifx/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ effect_colorloop:
min: 1
max: 100
unit_of_measurement: "%"
transition:
required: false
selector:
number:
min: 0
max: 3600
unit_of_measurement: seconds
period:
default: 60
selector:
Expand Down
4 changes: 4 additions & 0 deletions homeassistant/components/lifx/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
"name": "[%key:component::lifx::services::effect_pulse::fields::period::name%]",
"description": "Duration between color changes."
},
"transition": {
"name": "Transition",
"description": "Duration of the transition between colors."
},
"change": {
"name": "Change",
"description": "Hue movement per period, in degrees on a color wheel."
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/nextdns/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"integration_type": "service",
"iot_class": "cloud_polling",
"loggers": ["nextdns"],
"quality_scale": "bronze",
"requirements": ["nextdns==4.1.0"]
}
88 changes: 88 additions & 0 deletions homeassistant/components/nextdns/quality_scale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
rules:
# Bronze
action-setup:
status: exempt
comment: The integration does not register services.
appropriate-polling: done
brands: done
common-modules: done
config-flow-test-coverage: done
config-flow: done
dependency-transparency: done
docs-actions:
status: exempt
comment: The integration does not register services.
docs-high-level-description: done
docs-installation-instructions: done
docs-removal-instructions: done
entity-event-setup: done
entity-unique-id: done
has-entity-name: done
runtime-data: done
test-before-configure: done
test-before-setup: done
unique-config-entry: done

# Silver
action-exceptions:
status: exempt
comment: The integration does not register services.
config-entry-unloading: done
docs-configuration-parameters:
status: exempt
comment: No options to configure.
docs-installation-parameters: done
entity-unavailable: done
integration-owner: done
log-when-unavailable: done
parallel-updates: done
reauthentication-flow: done
test-coverage:
status: todo
comment: Patch NextDns object instead of functions.

# Gold
devices: done
diagnostics: done
discovery-update-info:
status: exempt
comment: The integration is a cloud service and thus does not support discovery.
discovery:
status: exempt
comment: The integration is a cloud service and thus does not support discovery.
docs-data-update: todo
docs-examples: todo
docs-known-limitations:
status: todo
comment: Add info that there are no known limitations.
docs-supported-devices:
status: exempt
comment: This is a service, which doesn't integrate with any devices.
docs-supported-functions: todo
docs-troubleshooting:
status: exempt
comment: No known issues that could be resolved by the user.
docs-use-cases: todo
dynamic-devices:
status: exempt
comment: This integration has a fixed single service.
entity-category: done
entity-device-class: done
entity-disabled-by-default: done
entity-translations: done
exception-translations: done
icon-translations: done
reconfiguration-flow:
status: todo
comment: Allow API key to be changed in the re-configure flow.
repair-issues:
status: exempt
comment: This integration doesn't have any cases where raising an issue is needed.
stale-devices:
status: exempt
comment: This integration has a fixed single service.

# Platinum
async-dependency: done
inject-websession: done
strict-typing: done
2 changes: 1 addition & 1 deletion homeassistant/components/samsungtv/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"integration_type": "device",
"iot_class": "local_push",
"loggers": ["samsungctl", "samsungtvws"],
"quality_scale": "bronze",
"quality_scale": "silver",
"requirements": [
"getmac==0.9.5",
"samsungctl[websocket]==0.7.1",
Expand Down
4 changes: 1 addition & 3 deletions homeassistant/components/samsungtv/quality_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ rules:
status: exempt
comment: no configuration options so far
docs-installation-parameters: done
entity-unavailable:
status: todo
comment: check super().unavailable
entity-unavailable: done
integration-owner: done
log-when-unavailable: done
parallel-updates: done
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/tuya/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class DPCode(StrEnum):
https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq
"""

ADD_ELE = "add_ele" # energy
AIR_QUALITY = "air_quality"
AIR_QUALITY_INDEX = "air_quality_index"
ALARM_DELAY_TIME = "alarm_delay_time"
Expand Down
6 changes: 6 additions & 0 deletions homeassistant/components/tuya/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,12 @@ class TuyaSensorEntityDescription(SensorEntityDescription):
suggested_unit_of_measurement=UnitOfElectricPotential.VOLT,
entity_registry_enabled_default=False,
),
TuyaSensorEntityDescription(
key=DPCode.ADD_ELE,
translation_key="total_energy",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),
TuyaSensorEntityDescription(
key=DPCode.VA_TEMPERATURE,
translation_key="temperature",
Expand Down
5 changes: 4 additions & 1 deletion homeassistant/components/uptimerobot/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ async def _async_update_data(self) -> list[UptimeRobotMonitor]:
if device := device_registry.async_get_device(
identifiers={(DOMAIN, monitor_id)}
):
device_registry.async_remove_device(device.id)
device_registry.async_update_device(
device_id=device.id,
remove_config_entry_id=self.config_entry.entry_id,
)

# If there are new monitors, we should reload the config entry so we can
# create new devices and entities.
Expand Down
4 changes: 1 addition & 3 deletions homeassistant/components/uptimerobot/quality_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ rules:
repair-issues:
status: exempt
comment: no known use cases for repair issues or flows, yet
stale-devices:
status: todo
comment: We should remove the config entry from the device rather than remove the device
stale-devices: done

# Platinum
async-dependency: done
Expand Down
Loading
Loading