This commit is contained in:
Home Assistant Version Control
2026-09-13 20:31:15 +00:00
parent 8228943800
commit d7a0a08372
42 changed files with 694 additions and 25 deletions
+101 -3
View File
@@ -7,14 +7,16 @@ For more details about this platform, please refer to the documentation at
https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639 https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639
""" """
from datetime import timedelta
import logging import logging
from alexapy import hide_serial from alexapy import AlexaAPI, hide_serial
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass, BinarySensorDeviceClass,
BinarySensorEntity, BinarySensorEntity,
) )
from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.helpers.update_coordinator import CoordinatorEntity
from . import ( from . import (
@@ -26,10 +28,13 @@ from . import (
) )
from .alexa_entity import parse_detection_state_from_coordinator from .alexa_entity import parse_detection_state_from_coordinator
from .const import CONF_EXTENDED_ENTITY_DISCOVERY from .const import CONF_EXTENDED_ENTITY_DISCOVERY
from .helpers import add_devices, safe_get from .helpers import _catch_login_errors, add_devices, safe_get
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
KIDS_SCAN_INTERVAL = timedelta(minutes=5)
KIDS_CAPABLE_FAMILIES = {"ECHO", "ROOK", "KNIGHT", "REAVER", "MANTIS"}
async def async_setup_platform(hass, config, add_devices_callback, discovery_info=None): async def async_setup_platform(hass, config, add_devices_callback, discovery_info=None):
"""Set up the Alexa sensor platform.""" """Set up the Alexa sensor platform."""
@@ -57,13 +62,38 @@ async def async_setup_platform(hass, config, add_devices_callback, discovery_inf
account_dict["entities"]["binary_sensor"].append(contact_sensor) account_dict["entities"]["binary_sensor"].append(contact_sensor)
devices.append(contact_sensor) devices.append(contact_sensor)
return await add_devices( # Amazon Kids (child mode) sensor per Echo device.
# Only create a sensor for Echos that already have a media_player entity, so
# the configured include/exclude device filters are inherited and the unique
# id can be scoped to the account exactly like the media player.
login_obj = account_dict["login_obj"]
media_players = account_dict["entities"]["media_player"]
kids_devices: list[BinarySensorEntity] = []
for key, device in account_dict["devices"]["media_player"].items():
if device.get("deviceFamily") not in KIDS_CAPABLE_FAMILIES:
continue
device_type = device.get("deviceType")
client = media_players.get(key)
if not device_type or client is None:
continue
kids_sensor = AmazonKidsSensor(login_obj, client, device_type)
account_dict["entities"]["binary_sensor"].append(kids_sensor)
kids_devices.append(kids_sensor)
result = await add_devices(
hide_email(account), hide_email(account),
devices, devices,
add_devices_callback, add_devices_callback,
include_filter, include_filter,
exclude_filter, exclude_filter,
) )
if kids_devices:
# Already scoped via the media_player entities, so no extra name filter.
result = (
await add_devices(hide_email(account), kids_devices, add_devices_callback)
and result
)
return result
async def async_setup_entry(hass, config_entry, async_add_devices): async def async_setup_entry(hass, config_entry, async_add_devices):
@@ -126,3 +156,71 @@ class AlexaContact(CoordinatorEntity, BinarySensorEntity):
self.coordinator.data and self.alexa_entity_id in self.coordinator.data self.coordinator.data and self.alexa_entity_id in self.coordinator.data
) )
return not last_refresh_success return not last_refresh_success
class AmazonKidsSensor(BinarySensorEntity):
"""Whether Amazon Kids (child mode) is active on an Echo device.
Polls the per-device ``isChildDirectedDevice`` state via alexapy on its own
interval (independent of the main coordinator).
"""
_attr_has_entity_name = True
_attr_name = "Amazon Kids"
_attr_icon = "mdi:account-child"
_attr_should_poll = False
def __init__(self, login, client, device_type: str) -> None:
"""Initialize the Amazon Kids sensor.
client is the Echo's media_player entity; its unique id already encodes
the account, so the sensor inherits the same (account-scoped) identity.
"""
self._login = login
self._client = client
self._serial = client.device_serial_number
self._device_type = device_type
self._state = None
@property
def unique_id(self):
"""Return the unique id, scoped to the account like the media player."""
return f"{self._client.unique_id}_amazon_kids"
@property
def is_on(self):
"""Return whether Amazon Kids is active."""
return self._state
@property
def available(self):
"""Return whether the state is known."""
return self._state is not None
@property
def device_info(self):
"""Attach to the Echo device."""
return {
"identifiers": {(DATA_ALEXAMEDIA, self._client.unique_id)},
"via_device": (DATA_ALEXAMEDIA, self._client.unique_id),
}
async def async_added_to_hass(self):
"""Do an initial refresh and schedule periodic updates."""
await self._async_refresh()
self.async_on_remove(
async_track_time_interval(
self.hass, self._async_interval, KIDS_SCAN_INTERVAL
)
)
async def _async_interval(self, now):
await self._async_refresh()
@_catch_login_errors
async def _async_refresh(self):
"""Fetch the current Amazon Kids state."""
self._state = await AlexaAPI.get_child_mode(
self._login, self._serial, self._device_type
)
self.async_write_ha_state()
+22 -7
View File
@@ -11,11 +11,23 @@ from __future__ import annotations
from datetime import timedelta from datetime import timedelta
from homeassistant.const import ( from homeassistant.const import PERCENTAGE
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_MILLION, try:
PERCENTAGE, # UnitOfDensity/UnitOfRatio were added in HA 2026.7.0. Below that (this
) # integration's floor is 2025.2.0), fall back to the equivalent
# CONCENTRATION_* constants -- deprecated starting in HA 2026.8 (removed
# in 2027.8) but still present as aliases for the same values, and the
# only ones that exist pre-2026.7.
from homeassistant.const import UnitOfDensity, UnitOfRatio
_MICROGRAMS_PER_CUBIC_METER = UnitOfDensity.MICROGRAMS_PER_CUBIC_METER
_PARTS_PER_MILLION = UnitOfRatio.PARTS_PER_MILLION
except ImportError:
from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER as _MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_MILLION as _PARTS_PER_MILLION,
)
PROJECT_URL = "https://github.com/alandtse/alexa_media_player/" PROJECT_URL = "https://github.com/alandtse/alexa_media_player/"
ISSUE_URL = f"{PROJECT_URL}issues" ISSUE_URL = f"{PROJECT_URL}issues"
@@ -78,6 +90,8 @@ SERVICE_RESTORE_VOLUME = "restore_volume"
SERVICE_GET_HISTORY_RECORDS = "get_history_records" SERVICE_GET_HISTORY_RECORDS = "get_history_records"
SERVICE_FORCE_LOGOUT = "force_logout" SERVICE_FORCE_LOGOUT = "force_logout"
SERVICE_ENABLE_NETWORK_DISCOVERY = "enable_network_discovery" SERVICE_ENABLE_NETWORK_DISCOVERY = "enable_network_discovery"
SERVICE_AMAZON_KIDS_ENABLE = "amazon_kids_enable"
SERVICE_AMAZON_KIDS_DISABLE = "amazon_kids_disable"
# Backoff durations for the last-called probe worker # Backoff durations for the last-called probe worker
LAST_CALLED_429_BACKOFF_INITIAL_S = 30.0 LAST_CALLED_429_BACKOFF_INITIAL_S = 30.0
@@ -147,6 +161,7 @@ ATTR_MESSAGE = "message"
ATTR_EMAIL = "email" ATTR_EMAIL = "email"
ATTR_ENTITY_ID = "entity_id" ATTR_ENTITY_ID = "entity_id"
ATTR_NUM_ENTRIES = "entries" ATTR_NUM_ENTRIES = "entries"
ATTR_CHILD = "child"
COMMON_BUCKET_COUNTS = ( COMMON_BUCKET_COUNTS = (
"accounts", "accounts",
"devices", "devices",
@@ -213,8 +228,8 @@ AUTH_PROXY_NAME = "auth:alexamedia:proxy"
ALEXA_UNIT_CONVERSION = { ALEXA_UNIT_CONVERSION = {
"Alexa.Unit.Percent": PERCENTAGE, "Alexa.Unit.Percent": PERCENTAGE,
"Alexa.Unit.PartsPerMillion": CONCENTRATION_PARTS_PER_MILLION, "Alexa.Unit.PartsPerMillion": _PARTS_PER_MILLION,
"Alexa.Unit.Density.MicroGramsPerCubicMeter": CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, "Alexa.Unit.Density.MicroGramsPerCubicMeter": _MICROGRAMS_PER_CUBIC_METER,
} }
ALEXA_ICON_CONVERSION = { ALEXA_ICON_CONVERSION = {
+2 -2
View File
@@ -9,10 +9,10 @@
"issue_tracker": "https://github.com/alandtse/alexa_media_player/issues", "issue_tracker": "https://github.com/alandtse/alexa_media_player/issues",
"loggers": ["alexapy", "authcaptureproxy"], "loggers": ["alexapy", "authcaptureproxy"],
"requirements": [ "requirements": [
"alexapy==1.29.25", "alexapy==1.30.0",
"packaging>=20.3", "packaging>=20.3",
"wrapt>=1.14.0", "wrapt>=1.14.0",
"dictor>=0.1.12,<0.2" "dictor>=0.1.12,<0.2"
], ],
"version": "5.15.7" "version": "5.16.0"
} }
+91
View File
@@ -16,14 +16,18 @@ from alexapy import AlexaAPI, AlexapyLoginError, hide_email
from alexapy.errors import AlexapyConnectionError from alexapy.errors import AlexapyConnectionError
from homeassistant.core import HomeAssistant, ServiceCall from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.helpers import config_validation as cv, entity_registry as er from homeassistant.helpers import config_validation as cv, entity_registry as er
from homeassistant.util import slugify
import voluptuous as vol import voluptuous as vol
from .const import ( from .const import (
ATTR_CHILD,
ATTR_EMAIL, ATTR_EMAIL,
ATTR_ENTITY_ID, ATTR_ENTITY_ID,
ATTR_NUM_ENTRIES, ATTR_NUM_ENTRIES,
DATA_ALEXAMEDIA, DATA_ALEXAMEDIA,
DOMAIN, DOMAIN,
SERVICE_AMAZON_KIDS_DISABLE,
SERVICE_AMAZON_KIDS_ENABLE,
SERVICE_ENABLE_NETWORK_DISCOVERY, SERVICE_ENABLE_NETWORK_DISCOVERY,
SERVICE_FORCE_LOGOUT, SERVICE_FORCE_LOGOUT,
SERVICE_GET_HISTORY_RECORDS, SERVICE_GET_HISTORY_RECORDS,
@@ -59,6 +63,14 @@ ENABLE_NETWORK_DISCOVERY_SCHEMA = vol.Schema(
} }
) )
AMAZON_KIDS_ENABLE_SCHEMA = vol.Schema(
{
vol.Required(ATTR_ENTITY_ID): cv.entity_id,
vol.Required(ATTR_CHILD): cv.string,
}
)
AMAZON_KIDS_DISABLE_SCHEMA = vol.Schema({vol.Required(ATTR_ENTITY_ID): cv.entity_id})
@dataclass(frozen=True) @dataclass(frozen=True)
class AlexaServiceDef: class AlexaServiceDef:
@@ -95,6 +107,16 @@ SERVICE_DEFS: tuple[AlexaServiceDef, ...] = (
schema=ENABLE_NETWORK_DISCOVERY_SCHEMA, schema=ENABLE_NETWORK_DISCOVERY_SCHEMA,
handler="enable_network_discovery", handler="enable_network_discovery",
), ),
AlexaServiceDef(
name=SERVICE_AMAZON_KIDS_ENABLE,
schema=AMAZON_KIDS_ENABLE_SCHEMA,
handler="amazon_kids_enable",
),
AlexaServiceDef(
name=SERVICE_AMAZON_KIDS_DISABLE,
schema=AMAZON_KIDS_DISABLE_SCHEMA,
handler="amazon_kids_disable",
),
) )
@@ -276,6 +298,75 @@ class AlexaMediaServices:
_LOGGER.debug("Volume restored to %s for entity %s", previous_volume, entity_id) _LOGGER.debug("Volume restored to %s for entity %s", previous_volume, entity_id)
return True return True
def _resolve_device(self, entity_id):
"""Resolve a media_player entity_id to (login_obj, serial, device_type)."""
entity_registry = er.async_get(self.hass)
entity_entry = entity_registry.async_get(entity_id)
if not entity_entry or entity_entry.platform != DOMAIN:
_LOGGER.error("Entity %s not found or not part of %s", entity_id, DOMAIN)
return None, None, None
unique_id = entity_entry.unique_id
accounts = self.hass.data[DATA_ALEXAMEDIA]["accounts"]
for email, account_dict in accounts.items():
for device in AlexaAPI.devices.get(email, []):
serial = device.get("serialNumber")
if not serial:
continue
# Match the media_player unique id convention: raw serial for the
# primary account, slugify("<serial>_<email>") for secondaries.
if unique_id in (serial, slugify(f"{serial}_{email}")):
return account_dict["login_obj"], serial, device.get("deviceType")
_LOGGER.error("No Alexa Media account/device found for entity %s", entity_id)
return None, None, None
async def _resolve_child_id(self, login_obj, child):
"""Resolve a child (directedId or first name) to its directedId."""
if child and child.startswith("amzn1.account"):
return child
profiles = await AlexaAPI.get_child_profiles(login_obj) or []
for profile in profiles:
if (profile.get("firstName") or "").lower() == (child or "").lower():
return profile.get("directedId")
_LOGGER.error("Child profile '%s' not found in household", child)
return None
@_catch_login_errors
async def amazon_kids_enable(self, call: ServiceCall) -> bool:
"""Enable Amazon Kids on a device by assigning it to a child profile.
Arguments:
call.ATTR_ENTITY_ID {str} -- Alexa Media Player entity.
call.ATTR_CHILD {str} -- Child first name or directedId.
"""
entity_id = call.data.get(ATTR_ENTITY_ID)
child = call.data.get(ATTR_CHILD)
login_obj, serial, device_type = self._resolve_device(entity_id)
if not login_obj:
return False
child_id = await self._resolve_child_id(login_obj, child)
if not child_id:
return False
await AlexaAPI.enable_child_mode(login_obj, serial, device_type, child_id)
_LOGGER.debug("Enabled Amazon Kids on %s for child %s", entity_id, child)
return True
@_catch_login_errors
async def amazon_kids_disable(self, call: ServiceCall) -> bool:
"""Disable Amazon Kids on a device (unassign it from any child).
Arguments:
call.ATTR_ENTITY_ID {str} -- Alexa Media Player entity.
"""
entity_id = call.data.get(ATTR_ENTITY_ID)
login_obj, serial, device_type = self._resolve_device(entity_id)
if not login_obj:
return False
await AlexaAPI.disable_child_mode(login_obj, serial, device_type)
_LOGGER.debug("Disabled Amazon Kids on %s", entity_id)
return True
async def get_history_records(self, call: ServiceCall) -> bool: async def get_history_records(self, call: ServiceCall) -> bool:
"""Handle request to get history records and store them on the entity.""" """Handle request to get history records and store them on the entity."""
entity_id = call.data.get(ATTR_ENTITY_ID) entity_id = call.data.get(ATTR_ENTITY_ID)
@@ -68,3 +68,36 @@ enable_network_discovery:
example: [email protected] example: [email protected]
selector: selector:
text: text:
amazon_kids_enable:
name: Enable Amazon Kids
description: Enable Amazon Kids (child mode) on an Echo by assigning it to a child profile.
fields:
entity_id:
name: Entity
description: Alexa Media Player device to enable Amazon Kids on.
required: true
selector:
entity:
domain: media_player
integration: alexa_media
child:
name: Child
description: Child profile first name (or directedId) to assign the device to.
required: true
example: "Anton"
selector:
text:
amazon_kids_disable:
name: Disable Amazon Kids
description: Disable Amazon Kids (child mode) on an Echo by unassigning it from any child.
fields:
entity_id:
name: Entity
description: Alexa Media Player device to disable Amazon Kids on.
required: true
selector:
entity:
domain: media_player
integration: alexa_media
@@ -132,6 +132,30 @@
"description": "Optional Alexa account email or list of emails. If empty, all known accounts will be refreshed." "description": "Optional Alexa account email or list of emails. If empty, all known accounts will be refreshed."
} }
} }
},
"amazon_kids_enable": {
"name": "Enable Amazon Kids",
"description": "Turns on Amazon Kids (child mode) for an Echo by assigning it to a child profile.",
"fields": {
"entity_id": {
"name": "Select media player:",
"description": "Echo device to enable Amazon Kids on"
},
"child": {
"name": "Child",
"description": "Child profile to assign (first name or directedId)"
}
}
},
"amazon_kids_disable": {
"name": "Disable Amazon Kids",
"description": "Turns off Amazon Kids (child mode) for an Echo by unassigning it from any child profile.",
"fields": {
"entity_id": {
"name": "Select media player:",
"description": "Echo device to disable Amazon Kids on"
}
}
} }
}, },
"entity": { "entity": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Turns off Amazon Kids (child mode) for an Echo by unassigning it from any child profile.",
"fields": {
"entity_id": {
"description": "Echo device to disable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Disable Amazon Kids"
},
"amazon_kids_enable": {
"description": "Turns on Amazon Kids (child mode) for an Echo by assigning it to a child profile.",
"fields": {
"child": {
"description": "Child profile to assign (first name or directedId)",
"name": "Child"
},
"entity_id": {
"description": "Echo device to enable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Enable Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "يعيد تفعيل اكتشاف شبكة Alexa بحيث تعيد دورة الاستطلاع التالية اكتشاف أجهزة Alexa للحسابات المحددة.", "description": "يعيد تفعيل اكتشاف شبكة Alexa بحيث تعيد دورة الاستطلاع التالية اكتشاف أجهزة Alexa للحسابات المحددة.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Turns off Amazon Kids (child mode) for an Echo by unassigning it from any child profile.",
"fields": {
"entity_id": {
"description": "Echo device to disable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Disable Amazon Kids"
},
"amazon_kids_enable": {
"description": "Turns on Amazon Kids (child mode) for an Echo by assigning it to a child profile.",
"fields": {
"child": {
"description": "Child profile to assign (first name or directedId)",
"name": "Child"
},
"entity_id": {
"description": "Echo device to enable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Enable Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Re-enables Alexa network discovery so the next polling cycle will rediscover Alexa devices for the selected accounts.", "description": "Re-enables Alexa network discovery so the next polling cycle will rediscover Alexa devices for the selected accounts.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Turns off Amazon Kids (child mode) for an Echo by unassigning it from any child profile.",
"fields": {
"entity_id": {
"description": "Echo device to disable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Disable Amazon Kids"
},
"amazon_kids_enable": {
"description": "Turns on Amazon Kids (child mode) for an Echo by assigning it to a child profile.",
"fields": {
"child": {
"description": "Child profile to assign (first name or directedId)",
"name": "Child"
},
"entity_id": {
"description": "Echo device to enable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Enable Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Re-enables Alexa network discovery so the next polling cycle will rediscover Alexa devices for the selected accounts.", "description": "Re-enables Alexa network discovery so the next polling cycle will rediscover Alexa devices for the selected accounts.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Deaktiviert Amazon Kids (Kindermodus) für ein Echo-Gerät, indem es von allen Kinderprofilen entfernt wird.",
"fields": {
"entity_id": {
"description": "Echo-Gerät zum Deaktivieren von Amazon Kids",
"name": "Medienplayer auswählen:"
}
},
"name": "Amazon Kids deaktivieren"
},
"amazon_kids_enable": {
"description": "Aktiviert Amazon Kids (Kindermodus) für ein Echo-Gerät, indem es einem Kinderprofil zugewiesen wird.",
"fields": {
"child": {
"description": "Kinderprofil zuweisen (Vorname oder Directed-ID)",
"name": "Kind"
},
"entity_id": {
"description": "Echo-Gerät zum Aktivieren von Amazon Kids",
"name": "Medienplayer auswählen:"
}
},
"name": "Amazon Kids aktivieren"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Aktiviert die Alexa-Netzwerkerkennung erneut, sodass beim nächsten Abfragezyklus die Alexa-Geräte für die ausgewählten Konten erneut erkannt werden.", "description": "Aktiviert die Alexa-Netzwerkerkennung erneut, sodass beim nächsten Abfragezyklus die Alexa-Geräte für die ausgewählten Konten erneut erkannt werden.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Turns off Amazon Kids (child mode) for an Echo by unassigning it from any child profile.",
"fields": {
"entity_id": {
"description": "Echo device to disable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Disable Amazon Kids"
},
"amazon_kids_enable": {
"description": "Turns on Amazon Kids (child mode) for an Echo by assigning it to a child profile.",
"fields": {
"child": {
"description": "Child profile to assign (first name or directedId)",
"name": "Child"
},
"entity_id": {
"description": "Echo device to enable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Enable Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Re-enables Alexa network discovery so the next polling cycle will rediscover Alexa devices for the selected accounts.", "description": "Re-enables Alexa network discovery so the next polling cycle will rediscover Alexa devices for the selected accounts.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Desactiva Amazon Kids (modo infantil) para un Echo desvinculándolo de cualquier perfil infantil.",
"fields": {
"entity_id": {
"description": "Dispositivo Echo para desactivar Amazon Kids en",
"name": "Seleccione el reproductor multimedia:"
}
},
"name": "Desactivar Amazon Kids"
},
"amazon_kids_enable": {
"description": "Activa Amazon Kids (modo infantil) para un Echo asignándole un perfil infantil.",
"fields": {
"child": {
"description": "Perfil del niño a asignar (nombre o ID dirigido)",
"name": "Niño"
},
"entity_id": {
"description": "Dispositivo Echo para habilitar Amazon Kids en",
"name": "Seleccione el reproductor multimedia:"
}
},
"name": "Habilitar Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Vuelve a habilitar el descubrimiento de red de Alexa para que el próximo ciclo de sondeo redescubra los dispositivos Alexa para las cuentas seleccionadas.", "description": "Vuelve a habilitar el descubrimiento de red de Alexa para que el próximo ciclo de sondeo redescubra los dispositivos Alexa para las cuentas seleccionadas.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Désactive Amazon Kids (mode enfant) pour un Echo en le dissociant de tout profil enfant.",
"fields": {
"entity_id": {
"description": "appareil Echo pour désactiver Amazon Kids sur",
"name": "Sélectionner le lecteur multimédia :"
}
},
"name": "Désactiver Amazon Kids"
},
"amazon_kids_enable": {
"description": "Active Amazon Kids (mode enfant) pour un Echo en l'associant à un profil enfant.",
"fields": {
"child": {
"description": "Profil enfant à attribuer (prénom ou identifiant direct)",
"name": "Enfant"
},
"entity_id": {
"description": "Appareil Echo pour activer Amazon Kids sur",
"name": "Sélectionner le lecteur multimédia :"
}
},
"name": "Activer Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Réactive la découverte du réseau Alexa afin que le prochain cycle d'interrogation redécouvre les appareils Alexa pour les comptes sélectionnés.", "description": "Réactive la découverte du réseau Alexa afin que le prochain cycle d'interrogation redécouvre les appareils Alexa pour les comptes sélectionnés.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Disattiva Amazon Kids (modalità bambino) per un Echo rimuovendolo da qualsiasi profilo bambino.",
"fields": {
"entity_id": {
"description": "Dispositivo Echo per disattivare Amazon Kids su",
"name": "Seleziona il lettore multimediale:"
}
},
"name": "Disattiva Amazon Kids"
},
"amazon_kids_enable": {
"description": "Attiva Amazon Kids (modalità bambino) per un dispositivo Echo assegnandolo a un profilo bambino.",
"fields": {
"child": {
"description": "Profilo bambino da assegnare (nome o ID indirizzato)",
"name": "Bambino"
},
"entity_id": {
"description": "Dispositivo Echo per abilitare Amazon Kids su",
"name": "Seleziona il lettore multimediale:"
}
},
"name": "Abilita Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Riattiva la rilevazione della rete Alexa in modo che il successivo ciclo di sondaggio rilevi i dispositivi Alexa per gli account selezionati.", "description": "Riattiva la rilevazione della rete Alexa in modo che il successivo ciclo di sondaggio rilevi i dispositivi Alexa per gli account selezionati.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Turns off Amazon Kids (child mode) for an Echo by unassigning it from any child profile.",
"fields": {
"entity_id": {
"description": "Echo device to disable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Disable Amazon Kids"
},
"amazon_kids_enable": {
"description": "Turns on Amazon Kids (child mode) for an Echo by assigning it to a child profile.",
"fields": {
"child": {
"description": "Child profile to assign (first name or directedId)",
"name": "Child"
},
"entity_id": {
"description": "Echo device to enable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Enable Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Alexa ネットワーク検出を再度有効にすると、次のポーリングサイクルで、選択したアカウントの Alexa デバイスが再検出されます。", "description": "Alexa ネットワーク検出を再度有効にすると、次のポーリングサイクルで、選択したアカウントの Alexa デバイスが再検出されます。",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Slår av Amazon Kids (barnemodus) for en Echo ved å fjerne tilordningen fra en hvilken som helst barneprofil.",
"fields": {
"entity_id": {
"description": "Echo-enhet for å deaktivere Amazon Kids på",
"name": "Velg mediespiller:"
}
},
"name": "Deaktiver Amazon Kids"
},
"amazon_kids_enable": {
"description": "Slår på Amazon Kids (barnemodus) for en Echo ved å tilordne den til en barneprofil.",
"fields": {
"child": {
"description": "Barneprofil som skal tilordnes (fornavn eller directedId)",
"name": "Barn"
},
"entity_id": {
"description": "Echo-enhet for å aktivere Amazon Kids",
"name": "Velg mediespiller:"
}
},
"name": "Aktiver Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Aktiverer Alexa-nettverksoppdagelse på nytt, slik at neste avstemningssyklus vil oppdage Alexa-enheter på nytt for de valgte kontoene.", "description": "Aktiverer Alexa-nettverksoppdagelse på nytt, slik at neste avstemningssyklus vil oppdage Alexa-enheter på nytt for de valgte kontoene.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Hiermee wordt Amazon Kids (kindermodus) voor een Echo uitgeschakeld door het apparaat los te koppelen van elk kinderprofiel.",
"fields": {
"entity_id": {
"description": "Amazon Kids uitschakelen op het Echo-apparaat",
"name": "Selecteer een mediaspeler:"
}
},
"name": "Amazon Kids uitschakelen"
},
"amazon_kids_enable": {
"description": "Hiermee wordt Amazon Kids (kindermodus) voor een Echo ingeschakeld door het apparaat aan een kinderprofiel toe te wijzen.",
"fields": {
"child": {
"description": "Kindprofiel dat moet worden toegewezen (voornaam of directedId)",
"name": "Kind"
},
"entity_id": {
"description": "Echo-apparaat om Amazon Kids in te schakelen",
"name": "Selecteer een mediaspeler:"
}
},
"name": "Amazon Kids inschakelen"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Hiermee wordt de Alexa-netwerkdetectie opnieuw ingeschakeld, zodat de volgende pollingcyclus Alexa-apparaten voor de geselecteerde accounts opnieuw kan detecteren.", "description": "Hiermee wordt de Alexa-netwerkdetectie opnieuw ingeschakeld, zodat de volgende pollingcyclus Alexa-apparaten voor de geselecteerde accounts opnieuw kan detecteren.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Wyłącza Amazon Kids (tryb dziecięcy) dla urządzenia Echo poprzez usunięcie jego przypisania do dowolnego profilu dziecięcego.",
"fields": {
"entity_id": {
"description": "Urządzenie Echo do wyłączania Amazon Kids",
"name": "Wybierz odtwarzacz multimedialny:"
}
},
"name": "Wyłącz Amazon Kids"
},
"amazon_kids_enable": {
"description": "Włącza Amazon Kids (tryb dziecięcy) dla urządzenia Echo poprzez przypisanie go do profilu dziecięcego.",
"fields": {
"child": {
"description": "Profil dziecka do przypisania (imię lub directionId)",
"name": "Dziecko"
},
"entity_id": {
"description": "Urządzenie Echo umożliwiające korzystanie z Amazon Kids",
"name": "Wybierz odtwarzacz multimedialny:"
}
},
"name": "Włącz Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Ponownie włącza wykrywanie sieci Alexa, dzięki czemu kolejny cykl sondowania ponownie wykryje urządzenia Alexa dla wybranych kont.", "description": "Ponownie włącza wykrywanie sieci Alexa, dzięki czemu kolejny cykl sondowania ponownie wykryje urządzenia Alexa dla wybranych kont.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Desativa o Amazon Kids (modo infantil) para um dispositivo Echo, removendo-o de qualquer perfil infantil.",
"fields": {
"entity_id": {
"description": "Dispositivo Echo para desativar o Amazon Kids em",
"name": "Selecione o media player:"
}
},
"name": "Desativar Amazon Kids"
},
"amazon_kids_enable": {
"description": "Ativa o Amazon Kids (modo infantil) em um dispositivo Echo, atribuindo-o a um perfil infantil.",
"fields": {
"child": {
"description": "Perfil da criança a ser atribuído (primeiro nome ou directedId)",
"name": "Criança"
},
"entity_id": {
"description": "Dispositivo Echo para ativar o Amazon Kids",
"name": "Selecione o media player:"
}
},
"name": "Ative o Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Reativa a descoberta de rede da Alexa para que o próximo ciclo de pesquisa redescubra os dispositivos Alexa das contas selecionadas.", "description": "Reativa a descoberta de rede da Alexa para que o próximo ciclo de pesquisa redescubra os dispositivos Alexa das contas selecionadas.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Desativa o Amazon Kids (modo infantil) para um dispositivo Echo, removendo-o de qualquer perfil infantil.",
"fields": {
"entity_id": {
"description": "Dispositivo Echo para desativar o Amazon Kids em",
"name": "Selecione o media player:"
}
},
"name": "Desativar Amazon Kids"
},
"amazon_kids_enable": {
"description": "Ativa o Amazon Kids (modo infantil) em um dispositivo Echo, atribuindo-o a um perfil infantil.",
"fields": {
"child": {
"description": "Perfil da criança a ser atribuído (primeiro nome ou directedId)",
"name": "Criança"
},
"entity_id": {
"description": "Dispositivo Echo para ativar o Amazon Kids",
"name": "Selecione o media player:"
}
},
"name": "Ative o Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Reativa a descoberta de rede da Alexa para que o próximo ciclo de pesquisa redescubra os dispositivos Alexa das contas selecionadas.", "description": "Reativa a descoberta de rede da Alexa para que o próximo ciclo de pesquisa redescubra os dispositivos Alexa das contas selecionadas.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Отключает детский режим Amazon Kids для Echo, удаляя его из любого детского профиля.",
"fields": {
"entity_id": {
"description": "Устройство Cho для отключения Amazon Kids",
"name": "Выберите медиа плеер:"
}
},
"name": "Отключить Amazon Kids"
},
"amazon_kids_enable": {
"description": "Включает детский режим Amazon Kids для устройства Echo, назначая его детскому профилю.",
"fields": {
"child": {
"description": "Профиль ребенка для присвоения (имя или directedId)",
"name": "Ребенок"
},
"entity_id": {
"description": "Устройство Echo для включения Amazon Kids",
"name": "Выберите медиа плеер:"
}
},
"name": "Включить Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Повторно включает обнаружение сети Alexa, чтобы в следующем цикле опроса были повторно обнаружены устройства Alexa для выбранных учетных записей.", "description": "Повторно включает обнаружение сети Alexa, чтобы в следующем цикле опроса были повторно обнаружены устройства Alexa для выбранных учетных записей.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Turns off Amazon Kids (child mode) for an Echo by unassigning it from any child profile.",
"fields": {
"entity_id": {
"description": "Echo device to disable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Disable Amazon Kids"
},
"amazon_kids_enable": {
"description": "Turns on Amazon Kids (child mode) for an Echo by assigning it to a child profile.",
"fields": {
"child": {
"description": "Child profile to assign (first name or directedId)",
"name": "Child"
},
"entity_id": {
"description": "Echo device to enable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Enable Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "Re-enables Alexa network discovery so the next polling cycle will rediscover Alexa devices for the selected accounts.", "description": "Re-enables Alexa network discovery so the next polling cycle will rediscover Alexa devices for the selected accounts.",
"fields": { "fields": {
@@ -130,6 +130,30 @@
} }
}, },
"services": { "services": {
"amazon_kids_disable": {
"description": "Turns off Amazon Kids (child mode) for an Echo by unassigning it from any child profile.",
"fields": {
"entity_id": {
"description": "Echo device to disable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Disable Amazon Kids"
},
"amazon_kids_enable": {
"description": "Turns on Amazon Kids (child mode) for an Echo by assigning it to a child profile.",
"fields": {
"child": {
"description": "Child profile to assign (first name or directedId)",
"name": "Child"
},
"entity_id": {
"description": "Echo device to enable Amazon Kids on",
"name": "Select media player:"
}
},
"name": "Enable Amazon Kids"
},
"enable_network_discovery": { "enable_network_discovery": {
"description": "重新启用 Alexa 网络发现功能,以便在下一个轮询周期中重新发现所选帐户的 Alexa 设备。", "description": "重新启用 Alexa 网络发现功能,以便在下一个轮询周期中重新发现所选帐户的 Alexa 设备。",
"fields": { "fields": {
+13 -13
View File
@@ -4,7 +4,7 @@
"state": "ON", "state": "ON",
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 118.9, "voltage": 119.4,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.35, "power_factor": 0.35,
@@ -30,7 +30,7 @@
"power": 2, "power": 2,
"current": 0.09, "current": 0.09,
"energy": 41.39, "energy": 41.39,
"power_factor": 0.18, "power_factor": 0.17,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -48,7 +48,7 @@
"voltage": 118.5, "voltage": 118.5,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"energy": 81.47, "energy": 81.47,
"power_factor": 0.89, "power_factor": 0.2,
"ac_frequency": 60, "ac_frequency": 60,
"update": { "update": {
"state": "idle", "state": "idle",
@@ -58,8 +58,8 @@
"latest_release_notes": null "latest_release_notes": null
}, },
"linkquality": 80, "linkquality": 80,
"power": 83.9, "power": 2.4,
"current": 0.78, "current": 0.12,
"power_on_behavior": "on" "power_on_behavior": "on"
}, },
"0xb40e060fffe031e3": { "0xb40e060fffe031e3": {
@@ -74,13 +74,13 @@
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"voltage": 117.8, "voltage": 118.3,
"state": "ON", "state": "ON",
"ac_frequency": 60, "ac_frequency": 60,
"energy": 165.71, "energy": 165.71,
"power": 0.9, "power": 0.9,
"current": 0.88, "current": 0.88,
"power_factor": 0.66, "power_factor": 0.34,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -96,12 +96,12 @@
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"voltage": 119, "voltage": 119,
"energy": 81.55, "energy": 81.56,
"state": "ON", "state": "ON",
"power": 59.3, "power": 55,
"current": 0.6, "current": 0.58,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.85, "power_factor": 0.83,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -136,13 +136,13 @@
"0xffffb40e0608864e": { "0xffffb40e0608864e": {
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 119.3, "voltage": 119.8,
"energy": 24.54, "energy": 24.54,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"state": "ON", "state": "ON",
"current": 0.02, "current": 0.02,
"ac_frequency": 60, "ac_frequency": 60,
"power": 0.4, "power": 0.3,
"power_factor": 0.14, "power_factor": 0.14,
"update": { "update": {
"state": "idle", "state": "idle",