Skip to content
Merged
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
5 changes: 5 additions & 0 deletions homeassistant/components/assist_pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
async_setup_pipeline_store,
async_update_pipeline,
)
from .select import AssistPipelineSelect, VadSensitivitySelect
from .vad import VadSensitivity
from .websocket_api import async_register_websocket_api

__all__ = (
Expand All @@ -51,11 +53,14 @@
"SAMPLE_CHANNELS",
"SAMPLE_RATE",
"SAMPLE_WIDTH",
"AssistPipelineSelect",
"AudioSettings",
"Pipeline",
"PipelineEvent",
"PipelineEventType",
"PipelineNotFound",
"VadSensitivity",
"VadSensitivitySelect",
"WakeWordSettings",
"async_create_default_pipeline",
"async_get_pipelines",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/cloud/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"integration_type": "system",
"iot_class": "cloud_push",
"loggers": ["acme", "hass_nabucasa", "snitun"],
"requirements": ["hass-nabucasa==1.3.0"],
"requirements": ["hass-nabucasa==1.4.0"],
"single_config_entry": true
}
7 changes: 5 additions & 2 deletions homeassistant/components/eheimdigital/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
from eheimdigital.device import EheimDigitalDevice
from eheimdigital.types import FilterErrorCode

from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.components.sensor.const import SensorDeviceClass
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
)
from homeassistant.const import PERCENTAGE, EntityCategory, UnitOfTime
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/energy/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
SensorEntity,
SensorStateClass,
)
from homeassistant.components.sensor.recorder import reset_detected
from homeassistant.components.sensor.recorder import ( # pylint: disable=hass-component-root-import
reset_detected,
)
from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT, UnitOfEnergy, UnitOfVolume
from homeassistant.core import (
HomeAssistant,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/epson/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/epson",
"iot_class": "local_polling",
"loggers": ["epson_projector"],
"requirements": ["epson-projector==0.5.1"]
"requirements": ["epson-projector==0.6.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/eq3btsmart/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.components.sensor.const import SensorStateClass
from homeassistant.const import PERCENTAGE
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from aioesphomeapi import EntityInfo, SelectInfo, SelectState

from homeassistant.components.assist_pipeline.select import (
from homeassistant.components.assist_pipeline import (
AssistPipelineSelect,
VadSensitivitySelect,
)
Expand Down
8 changes: 6 additions & 2 deletions homeassistant/components/firefly_iii/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

from pyfirefly.models import Account, Category

from homeassistant.components.sensor import SensorEntity, SensorStateClass, StateType
from homeassistant.components.sensor.const import SensorDeviceClass
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorStateClass,
StateType,
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
Expand Down
17 changes: 16 additions & 1 deletion homeassistant/components/iometer/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

from typing import Any, Final

from iometer import IOmeterClient, IOmeterConnectionError
from iometer import (
IOmeterClient,
IOmeterConnectionError,
IOmeterNoReadingsError,
IOmeterNoStatusError,
)
import voluptuous as vol

from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
Expand Down Expand Up @@ -34,6 +39,11 @@ async def async_step_zeroconf(
client = IOmeterClient(host=host, session=session)
try:
status = await client.get_current_status()
_ = await client.get_current_reading()
except IOmeterNoStatusError:
return self.async_abort(reason="no_status")
except IOmeterNoReadingsError:
return self.async_abort(reason="no_readings")
except IOmeterConnectionError:
return self.async_abort(reason="cannot_connect")

Expand Down Expand Up @@ -70,6 +80,11 @@ async def async_step_user(
client = IOmeterClient(host=self._host, session=session)
try:
status = await client.get_current_status()
_ = await client.get_current_reading()
except IOmeterNoStatusError:
errors["base"] = "no_status"
except IOmeterNoReadingsError:
errors["base"] = "no_readings"
except IOmeterConnectionError:
errors["base"] = "cannot_connect"
else:
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/iometer/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]"
},
"error": {
"no_status": "No status received from the IOmeter. Check your device status in the IOmeter app",
"no_readings": "No readings received from the IOmeter. Please attach the IOmeter Core to the electricity meter and wait for the first reading.",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
}
Expand Down
11 changes: 11 additions & 0 deletions homeassistant/components/mobile_app/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@
ATTR_LOCATION_NAME,
TrackerEntity,
)
from homeassistant.components.zone import (
ENTITY_ID_FORMAT as ZONE_ENTITY_ID_FORMAT,
HOME_ZONE,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_BATTERY_LEVEL,
ATTR_DEVICE_ID,
ATTR_GPS_ACCURACY,
ATTR_LATITUDE,
ATTR_LONGITUDE,
STATE_HOME,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceInfo
Expand Down Expand Up @@ -99,6 +104,12 @@ def longitude(self) -> float | None:
def location_name(self) -> str | None:
"""Return a location name for the current location of the device."""
if location_name := self._data.get(ATTR_LOCATION_NAME):
if location_name == HOME_ZONE:
return STATE_HOME
if zone_state := self.hass.states.get(
ZONE_ENTITY_ID_FORMAT.format(location_name)
):
return zone_state.name
return location_name
return None

Expand Down
28 changes: 25 additions & 3 deletions homeassistant/components/onewire/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from homeassistant.components.diagnostics import async_redact_data
from homeassistant.const import CONF_HOST
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr

from .onewirehub import OneWireConfigEntry

Expand All @@ -26,7 +27,28 @@ async def async_get_config_entry_diagnostics(
"data": async_redact_data(entry.data, TO_REDACT),
"options": {**entry.options},
},
"devices": [asdict(device_details) for device_details in onewire_hub.devices]
if onewire_hub.devices
else [],
"devices": [asdict(device_details) for device_details in onewire_hub.devices],
}


async def async_get_device_diagnostics(
hass: HomeAssistant, entry: OneWireConfigEntry, device_entry: dr.DeviceEntry
) -> dict[str, Any]:
"""Return diagnostics for a device."""

onewire_hub = entry.runtime_data

return {
"entry": {
"title": entry.title,
"data": async_redact_data(entry.data, TO_REDACT),
"options": {**entry.options},
},
"device": asdict(
next(
device_details
for device_details in onewire_hub.devices
if device_details.id[3:] == device_entry.serial_number
)
),
}
1 change: 1 addition & 0 deletions homeassistant/components/onewire/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"integration_type": "hub",
"iot_class": "local_polling",
"loggers": ["aio_ownet"],
"quality_scale": "silver",
"requirements": ["aio-ownet==0.0.4"],
"zeroconf": ["_owserver._tcp.local."]
}
36 changes: 10 additions & 26 deletions homeassistant/components/onewire/quality_scale.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
rules:
## Bronze
config-flow:
status: todo
comment: missing data_description on options flow
config-flow: done
test-before-configure: done
unique-config-entry:
status: done
Expand All @@ -16,27 +14,19 @@ rules:
entity-event-setup:
status: exempt
comment: entities do not subscribe to events
dependency-transparency:
status: todo
comment: The package is not built and published inside a CI pipeline
dependency-transparency: done
action-setup:
status: exempt
comment: No service actions currently available
common-modules:
status: done
comment: base entity available, but no coordinator
docs-high-level-description:
status: todo
comment: Under review
docs-installation-instructions:
status: todo
comment: Under review
docs-removal-instructions:
status: todo
comment: Under review
docs-high-level-description: done
docs-installation-instructions: done
docs-removal-instructions: done
docs-actions:
status: todo
comment: Under review
status: exempt
comment: No service actions currently available
brands: done

## Silver
Expand All @@ -52,12 +42,8 @@ rules:
parallel-updates: done
test-coverage: done
integration-owner: done
docs-installation-parameters:
status: todo
comment: Under review
docs-configuration-parameters:
status: todo
comment: Under review
docs-installation-parameters: done
docs-configuration-parameters: done

## Gold
entity-translations: done
Expand All @@ -73,9 +59,7 @@ rules:
comment: >
Manual removal, as it is not possible to distinguish
between a flaky device and a device that has been removed
diagnostics:
status: todo
comment: config-entry diagnostics level available, might be nice to have device-level diagnostics
diagnostics: done
exception-translations:
status: todo
comment: Under review
Expand Down
11 changes: 9 additions & 2 deletions homeassistant/components/onewire/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@
"step": {
"device_selection": {
"data": {
"clear_device_options": "Clear all device configurations",
"device_selection": "[%key:component::onewire::options::error::device_not_selected%]"
"clear_device_options": "Reset all device customisations",
"device_selection": "Customise specific devices"
},
"data_description": {
"clear_device_options": "Use this to reset all device specific options to default values.",
"device_selection": "Customise behaviour of individual devices."
},
"description": "Select what configuration steps to process",
"title": "1-Wire device options"
Expand All @@ -149,6 +153,9 @@
"data": {
"precision": "Sensor precision"
},
"data_description": {
"precision": "The lower the precision, the faster the sensor will respond, but with less accuracy."
},
"description": "Select sensor precision for {sensor_id}",
"title": "1-Wire sensor precision"
}
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/onvif/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def async_setup_entry(
vol.Optional(ATTR_TILT): vol.In([DIR_UP, DIR_DOWN]),
vol.Optional(ATTR_ZOOM): vol.In([ZOOM_OUT, ZOOM_IN]),
vol.Optional(ATTR_DISTANCE, default=0.1): cv.small_float,
vol.Optional(ATTR_SPEED, default=0.5): cv.small_float,
vol.Optional(ATTR_SPEED): cv.small_float,
vol.Optional(ATTR_MOVE_MODE, default=RELATIVE_MOVE): vol.In(
[
CONTINUOUS_MOVE,
Expand Down Expand Up @@ -210,10 +210,10 @@ async def _async_get_stream_uri(self) -> str:
async def async_perform_ptz(
self,
distance,
speed,
move_mode,
continuous_duration,
preset,
speed=None,
pan=None,
tilt=None,
zoom=None,
Expand Down
9 changes: 5 additions & 4 deletions homeassistant/components/onvif/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,10 +602,11 @@ async def async_perform_ptz(
return

req.PresetToken = preset_val
req.Speed = {
"PanTilt": {"x": speed_val, "y": speed_val},
"Zoom": {"x": speed_val},
}
if speed_val is not None:
req.Speed = {
"PanTilt": {"x": speed_val, "y": speed_val},
"Zoom": {"x": speed_val},
}
await ptz_service.GotoPreset(req)
elif move_mode == STOP_MOVE:
await ptz_service.Stop(req)
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/onvif/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ptz:
max: 1
step: 0.01
speed:
default: 0.5
selector:
number:
min: 0
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/shelly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
)
from .repairs import (
async_manage_ble_scanner_firmware_unsupported_issue,
async_manage_deprecated_firmware_issue,
async_manage_outbound_websocket_incorrectly_enabled_issue,
async_manage_wall_display_firmware_unsupported_issue,
)
from .utils import (
async_create_issue_unsupported_firmware,
Expand Down Expand Up @@ -337,7 +337,7 @@ async def _async_setup_rpc_entry(hass: HomeAssistant, entry: ShellyConfigEntry)
await hass.config_entries.async_forward_entry_setups(
entry, runtime_data.platforms
)
async_manage_wall_display_firmware_unsupported_issue(hass, entry)
async_manage_deprecated_firmware_issue(hass, entry)
async_manage_ble_scanner_firmware_unsupported_issue(
hass,
entry,
Expand Down
Loading
Loading