From b6fb2f7e90e7557db2b09389b7886c38b8bfe445 Mon Sep 17 00:00:00 2001 From: jameson_uk <1040621+jamesonuk@users.noreply.github.com> Date: Sat, 19 Sep 2026 12:20:31 +0100 Subject: [PATCH] alexa_devices: ensure consistent naming (#182673) --- homeassistant/components/alexa_devices/binary_sensor.py | 6 +++--- homeassistant/components/alexa_devices/notify.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/alexa_devices/binary_sensor.py b/homeassistant/components/alexa_devices/binary_sensor.py index c16da0e7af3d..a7df8b9e8558 100644 --- a/homeassistant/components/alexa_devices/binary_sensor.py +++ b/homeassistant/components/alexa_devices/binary_sensor.py @@ -32,7 +32,7 @@ class AmazonBinarySensorEntityDescription(BinarySensorEntityDescription): """Alexa Devices binary sensor entity description.""" is_on_fn: Callable[[AmazonDevice, str], bool] - is_supported: Callable[[AmazonDevice, str], bool] = lambda device, key: True + is_supported_fn: Callable[[AmazonDevice, str], bool] = lambda device, key: True is_available_fn: Callable[[AmazonDevice, str], bool] = lambda device, key: True @@ -49,7 +49,7 @@ BINARY_SENSORS: Final = ( is_on_fn=lambda device, key: bool( device.sensors[key].value != SENSOR_STATE_OFF ), - is_supported=lambda device, key: device.sensors.get(key) is not None, + is_supported_fn=lambda device, key: device.sensors.get(key) is not None, is_available_fn=lambda device, key: ( device.online and (sensor := device.sensors.get(key)) is not None @@ -134,7 +134,7 @@ async def async_setup_entry( AmazonBinarySensorEntity(coordinator, serial_num, sensor_desc) for sensor_desc in BINARY_SENSORS for serial_num in new_devices - if sensor_desc.is_supported( + if sensor_desc.is_supported_fn( coordinator.data[serial_num], sensor_desc.key ) ) diff --git a/homeassistant/components/alexa_devices/notify.py b/homeassistant/components/alexa_devices/notify.py index 37b1f7f7137e..ebd4e0c8451f 100644 --- a/homeassistant/components/alexa_devices/notify.py +++ b/homeassistant/components/alexa_devices/notify.py @@ -22,7 +22,7 @@ PARALLEL_UPDATES = 1 class AmazonNotifyEntityDescription(NotifyEntityDescription): """Alexa Devices notify entity description.""" - is_supported: Callable[[AmazonDevice], bool] = lambda _device: True + is_supported_fn: Callable[[AmazonDevice], bool] = lambda _device: True is_available_fn: Callable[[AmazonDevice], bool] = lambda _device: True method: Callable[[AmazonEchoApi, AmazonDevice, str], Awaitable[None]] subkey: str @@ -33,7 +33,7 @@ NOTIFY: Final = ( key="speak", translation_key="speak", subkey="AUDIO_PLAYER", - is_supported=lambda _device: _device.device_family != SPEAKER_GROUP_FAMILY, + is_supported_fn=lambda _device: _device.device_family != SPEAKER_GROUP_FAMILY, method=lambda api, device, message: api.call_alexa_speak(device, message), ), AmazonNotifyEntityDescription( @@ -71,7 +71,7 @@ async def async_setup_entry( for sensor_desc in NOTIFY for serial_num in new_devices if sensor_desc.subkey in coordinator.data[serial_num].capabilities - and sensor_desc.is_supported(coordinator.data[serial_num]) + and sensor_desc.is_supported_fn(coordinator.data[serial_num]) ) _check_device()