Refactor sensors and binary sensors in Xbox integration (#154719)

This commit is contained in:
Manu
2025-10-19 19:49:36 +02:00
committed by GitHub
parent b2699d8a03
commit 0f3de627c5
9 changed files with 363 additions and 233 deletions
+1 -1
View File
@@ -33,6 +33,6 @@ class AsyncConfigEntryAuth(AuthenticationManager):
tokens = {**self._oauth_session.token}
issued = tokens["expires_at"] - tokens["expires_in"]
del tokens["expires_at"]
token_response = OAuth2TokenResponse.parse_obj(tokens)
token_response = OAuth2TokenResponse.model_validate(tokens)
token_response.issued = utc_from_timestamp(issued)
return token_response
+92 -31
View File
@@ -2,17 +2,84 @@
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from enum import StrEnum
from functools import partial
from homeassistant.components.binary_sensor import BinarySensorEntity
from yarl import URL
from homeassistant.components.binary_sensor import (
BinarySensorEntity,
BinarySensorEntityDescription,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .coordinator import XboxConfigEntry, XboxUpdateCoordinator
from .coordinator import PresenceData, XboxConfigEntry, XboxUpdateCoordinator
from .entity import XboxBaseEntity
PRESENCE_ATTRIBUTES = ["online", "in_party", "in_game", "in_multiplayer"]
class XboxBinarySensor(StrEnum):
"""Xbox binary sensor."""
ONLINE = "online"
IN_PARTY = "in_party"
IN_GAME = "in_game"
IN_MULTIPLAYER = "in_multiplayer"
@dataclass(kw_only=True, frozen=True)
class XboxBinarySensorEntityDescription(BinarySensorEntityDescription):
"""Xbox binary sensor description."""
is_on_fn: Callable[[PresenceData], bool | None]
entity_picture_fn: Callable[[PresenceData], str | None] | None = None
def profile_pic(data: PresenceData) -> str | None:
"""Return the gamer pic."""
# Xbox sometimes returns a domain that uses a wrong certificate which
# creates issues with loading the image.
# The correct domain is images-eds-ssl which can just be replaced
# to point to the correct image, with the correct domain and certificate.
# We need to also remove the 'mode=Padding' query because with it,
# it results in an error 400.
url = URL(data.display_pic)
if url.host == "images-eds.xboxlive.com":
url = url.with_host("images-eds-ssl.xboxlive.com").with_scheme("https")
query = dict(url.query)
query.pop("mode", None)
return str(url.with_query(query))
SENSOR_DESCRIPTIONS: tuple[XboxBinarySensorEntityDescription, ...] = (
XboxBinarySensorEntityDescription(
key=XboxBinarySensor.ONLINE,
translation_key=XboxBinarySensor.ONLINE,
is_on_fn=lambda x: x.online,
name=None,
entity_picture_fn=profile_pic,
),
XboxBinarySensorEntityDescription(
key=XboxBinarySensor.IN_PARTY,
translation_key=XboxBinarySensor.IN_PARTY,
is_on_fn=lambda x: x.in_party,
entity_registry_enabled_default=False,
),
XboxBinarySensorEntityDescription(
key=XboxBinarySensor.IN_GAME,
translation_key=XboxBinarySensor.IN_GAME,
is_on_fn=lambda x: x.in_game,
),
XboxBinarySensorEntityDescription(
key=XboxBinarySensor.IN_MULTIPLAYER,
translation_key=XboxBinarySensor.IN_MULTIPLAYER,
is_on_fn=lambda x: x.in_multiplayer,
entity_registry_enabled_default=False,
),
)
async def async_setup_entry(
@@ -33,13 +100,23 @@ async def async_setup_entry(
class XboxBinarySensorEntity(XboxBaseEntity, BinarySensorEntity):
"""Representation of a Xbox presence state."""
@property
def is_on(self) -> bool:
"""Return the status of the requested attribute."""
if not self.coordinator.last_update_success:
return False
entity_description: XboxBinarySensorEntityDescription
return getattr(self.data, self.attribute, False)
@property
def is_on(self) -> bool | None:
"""Return the status of the requested attribute."""
return self.entity_description.is_on_fn(self.data)
@property
def entity_picture(self) -> str | None:
"""Return the gamer pic."""
return (
fn(self.data)
if (fn := self.entity_description.entity_picture_fn) is not None
else super().entity_picture
)
@callback
@@ -56,29 +133,13 @@ def async_update_friends(
new_entities: list[XboxBinarySensorEntity] = []
for xuid in new_ids - current_ids:
current[xuid] = [
XboxBinarySensorEntity(coordinator, xuid, attribute)
for attribute in PRESENCE_ATTRIBUTES
XboxBinarySensorEntity(coordinator, xuid, description)
for description in SENSOR_DESCRIPTIONS
]
new_entities = new_entities + current[xuid]
async_add_entities(new_entities)
if new_entities:
async_add_entities(new_entities)
# Process deleted favorites, remove them from Home Assistant
for xuid in current_ids - new_ids:
coordinator.hass.async_create_task(
async_remove_entities(xuid, coordinator, current)
)
async def async_remove_entities(
xuid: str,
coordinator: XboxUpdateCoordinator,
current: dict[str, list[XboxBinarySensorEntity]],
) -> None:
"""Remove friend sensors from Home Assistant."""
registry = er.async_get(coordinator.hass)
entities = current[xuid]
for entity in entities:
if entity.entity_id in registry.entities:
registry.async_remove(entity.entity_id)
del current[xuid]
del current[xuid]
+28 -1
View File
@@ -21,6 +21,7 @@ from xbox.webapi.api.provider.smartglass.models import (
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from .const import DOMAIN
@@ -86,6 +87,7 @@ class XboxUpdateCoordinator(DataUpdateCoordinator[XboxData]):
self.data = XboxData({}, {})
self.client: XboxLiveClient = client
self.consoles: SmartglassConsoleList = consoles
self.current_friends: set[str] = set()
async def _async_update_data(self) -> XboxData:
"""Fetch the latest console status."""
@@ -100,7 +102,7 @@ class XboxUpdateCoordinator(DataUpdateCoordinator[XboxData]):
_LOGGER.debug(
"%s status: %s",
console.name,
status.dict(),
status.model_dump(),
)
# Setup focus app
@@ -147,8 +149,33 @@ class XboxUpdateCoordinator(DataUpdateCoordinator[XboxData]):
presence_data[friend.xuid] = _build_presence_data(friend)
if (
self.current_friends
- (new_friends := {x.xuid for x in presence_data.values()})
or not self.current_friends
):
self.remove_stale_devices(presence_data)
self.current_friends = new_friends
return XboxData(new_console_data, presence_data)
def remove_stale_devices(self, presence_data: dict[str, PresenceData]) -> None:
"""Remove stale devices from registry."""
device_reg = dr.async_get(self.hass)
identifiers = {(DOMAIN, person.xuid) for person in presence_data.values()} | {
(DOMAIN, console.id) for console in self.consoles.result
}
for device in dr.async_entries_for_config_entry(
device_reg, self.config_entry.entry_id
):
if not set(device.identifiers) & identifiers:
_LOGGER.debug("Removing stale device %s", device.name)
device_reg.async_update_device(
device.id, remove_config_entry_id=self.config_entry.entry_id
)
def _build_presence_data(person: Person) -> PresenceData:
"""Build presence data from a person."""
+16 -42
View File
@@ -2,9 +2,8 @@
from __future__ import annotations
from yarl import URL
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.entity import EntityDescription
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
@@ -14,55 +13,30 @@ from .coordinator import PresenceData, XboxUpdateCoordinator
class XboxBaseEntity(CoordinatorEntity[XboxUpdateCoordinator]):
"""Base Sensor for the Xbox Integration."""
_attr_has_entity_name = True
def __init__(
self, coordinator: XboxUpdateCoordinator, xuid: str, attribute: str
self,
coordinator: XboxUpdateCoordinator,
xuid: str,
entity_description: EntityDescription,
) -> None:
"""Initialize Xbox binary sensor."""
super().__init__(coordinator)
self.xuid = xuid
self.attribute = attribute
self._attr_unique_id = f"{xuid}_{attribute}"
self._attr_entity_registry_enabled_default = attribute == "online"
self.entity_description = entity_description
self._attr_unique_id = f"{xuid}_{entity_description.key}"
self._attr_device_info = DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, "xbox_live")},
identifiers={(DOMAIN, xuid)},
manufacturer="Microsoft",
model="Xbox Live",
name="Xbox Live",
model="Xbox Network",
name=self.data.gamertag,
)
@property
def data(self) -> PresenceData | None:
def data(self) -> PresenceData:
"""Return coordinator data for this console."""
return self.coordinator.data.presence.get(self.xuid)
@property
def name(self) -> str | None:
"""Return the name of the sensor."""
if not self.data:
return None
if self.attribute == "online":
return self.data.gamertag
attr_name = " ".join([part.title() for part in self.attribute.split("_")])
return f"{self.data.gamertag} {attr_name}"
@property
def entity_picture(self) -> str | None:
"""Return the gamer pic."""
if not self.data:
return None
# Xbox sometimes returns a domain that uses a wrong certificate which
# creates issues with loading the image.
# The correct domain is images-eds-ssl which can just be replaced
# to point to the correct image, with the correct domain and certificate.
# We need to also remove the 'mode=Padding' query because with it,
# it results in an error 400.
url = URL(self.data.display_pic)
if url.host == "images-eds.xboxlive.com":
url = url.with_host("images-eds-ssl.xboxlive.com").with_scheme("https")
query = dict(url.query)
query.pop("mode", None)
return str(url.with_query(query))
return self.coordinator.data.presence[self.xuid]
+32
View File
@@ -0,0 +1,32 @@
{
"entity": {
"sensor": {
"status": {
"default": "mdi:message-text-outline"
},
"gamer_score": {
"default": "mdi:alpha-g-circle"
},
"account_tier": {
"default": "mdi:microsoft-xbox"
},
"gold_tenure": {
"default": "mdi:microsoft-xbox"
}
},
"binary_sensor": {
"online": {
"default": "mdi:account"
},
"in_party": {
"default": "mdi:account-group"
},
"in_game": {
"default": "mdi:microsoft-xbox-controller"
},
"in_multiplayer": {
"default": "mdi:account-multiple"
}
}
}
}
+58 -32
View File
@@ -1,18 +1,61 @@
"""Xbox friends binary sensors."""
"""Sensor platform for the Xbox integration."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from enum import StrEnum
from functools import partial
from homeassistant.components.sensor import SensorEntity
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from .coordinator import XboxConfigEntry, XboxUpdateCoordinator
from .coordinator import PresenceData, XboxConfigEntry, XboxUpdateCoordinator
from .entity import XboxBaseEntity
SENSOR_ATTRIBUTES = ["status", "gamer_score", "account_tier", "gold_tenure"]
class XboxSensor(StrEnum):
"""Xbox sensor."""
STATUS = "status"
GAMER_SCORE = "gamer_score"
ACCOUNT_TIER = "account_tier"
GOLD_TENURE = "gold_tenure"
@dataclass(kw_only=True, frozen=True)
class XboxSensorEntityDescription(SensorEntityDescription):
"""Xbox sensor description."""
value_fn: Callable[[PresenceData], StateType]
SENSOR_DESCRIPTIONS: tuple[XboxSensorEntityDescription, ...] = (
XboxSensorEntityDescription(
key=XboxSensor.STATUS,
translation_key=XboxSensor.STATUS,
value_fn=lambda x: x.status,
),
XboxSensorEntityDescription(
key=XboxSensor.GAMER_SCORE,
translation_key=XboxSensor.GAMER_SCORE,
value_fn=lambda x: x.gamer_score,
),
XboxSensorEntityDescription(
key=XboxSensor.ACCOUNT_TIER,
translation_key=XboxSensor.ACCOUNT_TIER,
entity_registry_enabled_default=False,
value_fn=lambda x: x.account_tier,
),
XboxSensorEntityDescription(
key=XboxSensor.GOLD_TENURE,
translation_key=XboxSensor.GOLD_TENURE,
entity_registry_enabled_default=False,
value_fn=lambda x: x.gold_tenure,
),
)
async def async_setup_entry(
@@ -32,13 +75,12 @@ async def async_setup_entry(
class XboxSensorEntity(XboxBaseEntity, SensorEntity):
"""Representation of a Xbox presence state."""
@property
def native_value(self):
"""Return the state of the requested attribute."""
if not self.coordinator.last_update_success:
return None
entity_description: XboxSensorEntityDescription
return getattr(self.data, self.attribute, None)
@property
def native_value(self) -> StateType:
"""Return the state of the requested attribute."""
return self.entity_description.value_fn(self.data)
@callback
@@ -55,29 +97,13 @@ def async_update_friends(
new_entities: list[XboxSensorEntity] = []
for xuid in new_ids - current_ids:
current[xuid] = [
XboxSensorEntity(coordinator, xuid, attribute)
for attribute in SENSOR_ATTRIBUTES
XboxSensorEntity(coordinator, xuid, description)
for description in SENSOR_DESCRIPTIONS
]
new_entities = new_entities + current[xuid]
async_add_entities(new_entities)
if new_entities:
async_add_entities(new_entities)
# Process deleted favorites, remove them from Home Assistant
for xuid in current_ids - new_ids:
coordinator.hass.async_create_task(
async_remove_entities(xuid, coordinator, current)
)
async def async_remove_entities(
xuid: str,
coordinator: XboxUpdateCoordinator,
current: dict[str, list[XboxSensorEntity]],
) -> None:
"""Remove friend sensors from Home Assistant."""
registry = er.async_get(coordinator.hass)
entities = current[xuid]
for entity in entities:
if entity.entity_id in registry.entities:
registry.async_remove(entity.entity_id)
del current[xuid]
del current[xuid]
@@ -23,5 +23,33 @@
"create_entry": {
"default": "[%key:common::config_flow::create_entry::authenticated%]"
}
},
"entity": {
"sensor": {
"status": {
"name": "Status"
},
"gamer_score": {
"name": "Gamerscore",
"unit_of_measurement": "points"
},
"account_tier": {
"name": "Account tier"
},
"gold_tenure": {
"name": "Gold tenure"
}
},
"binary_sensor": {
"in_party": {
"name": "In party"
},
"in_game": {
"name": "In game"
},
"in_multiplayer": {
"name": "In multiplayer"
}
}
}
}
@@ -13,7 +13,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.erics273',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -24,12 +24,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'erics273',
'original_name': None,
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.ONLINE: 'online'>,
'unique_id': '2533274913657542_online',
'unit_of_measurement': None,
})
@@ -62,7 +62,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.erics273_in_game',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -73,12 +73,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'erics273 In Game',
'original_name': 'In game',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_GAME: 'in_game'>,
'unique_id': '2533274913657542_in_game',
'unit_of_measurement': None,
})
@@ -86,8 +86,7 @@
# name: test_binary_sensors[binary_sensor.erics273_in_game-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=rwljod2fPqLqGP3DBV9F_yK9iuxAt3_MH6tcOnQXTc8LY1LO8JeulzCEFHaqqItKdg9oJ84qjO.VNwvUWuq_iR5iTyx1gQsqHSvWLbqIrRI-&background=0xababab&format=png',
'friendly_name': 'erics273 In Game',
'friendly_name': 'erics273 In game',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.erics273_in_game',
@@ -111,7 +110,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.erics273_in_multiplayer',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -122,12 +121,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'erics273 In Multiplayer',
'original_name': 'In multiplayer',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_MULTIPLAYER: 'in_multiplayer'>,
'unique_id': '2533274913657542_in_multiplayer',
'unit_of_measurement': None,
})
@@ -135,8 +134,7 @@
# name: test_binary_sensors[binary_sensor.erics273_in_multiplayer-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=rwljod2fPqLqGP3DBV9F_yK9iuxAt3_MH6tcOnQXTc8LY1LO8JeulzCEFHaqqItKdg9oJ84qjO.VNwvUWuq_iR5iTyx1gQsqHSvWLbqIrRI-&background=0xababab&format=png',
'friendly_name': 'erics273 In Multiplayer',
'friendly_name': 'erics273 In multiplayer',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.erics273_in_multiplayer',
@@ -160,7 +158,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.erics273_in_party',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -171,12 +169,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'erics273 In Party',
'original_name': 'In party',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_PARTY: 'in_party'>,
'unique_id': '2533274913657542_in_party',
'unit_of_measurement': None,
})
@@ -184,8 +182,7 @@
# name: test_binary_sensors[binary_sensor.erics273_in_party-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=rwljod2fPqLqGP3DBV9F_yK9iuxAt3_MH6tcOnQXTc8LY1LO8JeulzCEFHaqqItKdg9oJ84qjO.VNwvUWuq_iR5iTyx1gQsqHSvWLbqIrRI-&background=0xababab&format=png',
'friendly_name': 'erics273 In Party',
'friendly_name': 'erics273 In party',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.erics273_in_party',
@@ -209,7 +206,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.gsr_ae',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -220,12 +217,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'GSR Ae',
'original_name': None,
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.ONLINE: 'online'>,
'unique_id': '271958441785640_online',
'unit_of_measurement': None,
})
@@ -258,7 +255,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.gsr_ae_in_game',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -269,12 +266,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'GSR Ae In Game',
'original_name': 'In game',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_GAME: 'in_game'>,
'unique_id': '271958441785640_in_game',
'unit_of_measurement': None,
})
@@ -282,8 +279,7 @@
# name: test_binary_sensors[binary_sensor.gsr_ae_in_game-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3M0aLOK2kxE9mbLm9M2.R0stAQYoDsGCDJxqDzG9WF3oa4rOCjEK7DbZXdBmBWnMrfErA3M_Q4y_mUTEQLqSAEeYFGlGeCXYsccnQMvEecxRg-&format=png',
'friendly_name': 'GSR Ae In Game',
'friendly_name': 'GSR Ae In game',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.gsr_ae_in_game',
@@ -307,7 +303,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.gsr_ae_in_multiplayer',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -318,12 +314,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'GSR Ae In Multiplayer',
'original_name': 'In multiplayer',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_MULTIPLAYER: 'in_multiplayer'>,
'unique_id': '271958441785640_in_multiplayer',
'unit_of_measurement': None,
})
@@ -331,8 +327,7 @@
# name: test_binary_sensors[binary_sensor.gsr_ae_in_multiplayer-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3M0aLOK2kxE9mbLm9M2.R0stAQYoDsGCDJxqDzG9WF3oa4rOCjEK7DbZXdBmBWnMrfErA3M_Q4y_mUTEQLqSAEeYFGlGeCXYsccnQMvEecxRg-&format=png',
'friendly_name': 'GSR Ae In Multiplayer',
'friendly_name': 'GSR Ae In multiplayer',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.gsr_ae_in_multiplayer',
@@ -356,7 +351,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.gsr_ae_in_party',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -367,12 +362,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'GSR Ae In Party',
'original_name': 'In party',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_PARTY: 'in_party'>,
'unique_id': '271958441785640_in_party',
'unit_of_measurement': None,
})
@@ -380,8 +375,7 @@
# name: test_binary_sensors[binary_sensor.gsr_ae_in_party-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3M0aLOK2kxE9mbLm9M2.R0stAQYoDsGCDJxqDzG9WF3oa4rOCjEK7DbZXdBmBWnMrfErA3M_Q4y_mUTEQLqSAEeYFGlGeCXYsccnQMvEecxRg-&format=png',
'friendly_name': 'GSR Ae In Party',
'friendly_name': 'GSR Ae In party',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.gsr_ae_in_party',
@@ -405,7 +399,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.ikken_hissatsuu',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -416,12 +410,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Ikken Hissatsuu',
'original_name': None,
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.ONLINE: 'online'>,
'unique_id': '2533274838782903_online',
'unit_of_measurement': None,
})
@@ -454,7 +448,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.ikken_hissatsuu_in_game',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -465,12 +459,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Ikken Hissatsuu In Game',
'original_name': 'In game',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_GAME: 'in_game'>,
'unique_id': '2533274838782903_in_game',
'unit_of_measurement': None,
})
@@ -478,8 +472,7 @@
# name: test_binary_sensors[binary_sensor.ikken_hissatsuu_in_game-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=7OTVnZUMVj4OV2zUUGecWvn3U00nQQLfK7_kwpANogj9vJpb.t4ZQMMLIWOuBZBBZs5MjD7okwh5Zwnit1SAtO3OAsFXxJc1ALIbaVoRo7gsiun9FdcaTpzkM60nqzT8ip1659eQpB1SLyupscP.ec_wAGvXwkhCcTKCNHQMrxg-&format=png',
'friendly_name': 'Ikken Hissatsuu In Game',
'friendly_name': 'Ikken Hissatsuu In game',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.ikken_hissatsuu_in_game',
@@ -503,7 +496,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.ikken_hissatsuu_in_multiplayer',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -514,12 +507,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Ikken Hissatsuu In Multiplayer',
'original_name': 'In multiplayer',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_MULTIPLAYER: 'in_multiplayer'>,
'unique_id': '2533274838782903_in_multiplayer',
'unit_of_measurement': None,
})
@@ -527,8 +520,7 @@
# name: test_binary_sensors[binary_sensor.ikken_hissatsuu_in_multiplayer-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=7OTVnZUMVj4OV2zUUGecWvn3U00nQQLfK7_kwpANogj9vJpb.t4ZQMMLIWOuBZBBZs5MjD7okwh5Zwnit1SAtO3OAsFXxJc1ALIbaVoRo7gsiun9FdcaTpzkM60nqzT8ip1659eQpB1SLyupscP.ec_wAGvXwkhCcTKCNHQMrxg-&format=png',
'friendly_name': 'Ikken Hissatsuu In Multiplayer',
'friendly_name': 'Ikken Hissatsuu In multiplayer',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.ikken_hissatsuu_in_multiplayer',
@@ -552,7 +544,7 @@
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.ikken_hissatsuu_in_party',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -563,12 +555,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Ikken Hissatsuu In Party',
'original_name': 'In party',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxBinarySensor.IN_PARTY: 'in_party'>,
'unique_id': '2533274838782903_in_party',
'unit_of_measurement': None,
})
@@ -576,8 +568,7 @@
# name: test_binary_sensors[binary_sensor.ikken_hissatsuu_in_party-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=7OTVnZUMVj4OV2zUUGecWvn3U00nQQLfK7_kwpANogj9vJpb.t4ZQMMLIWOuBZBBZs5MjD7okwh5Zwnit1SAtO3OAsFXxJc1ALIbaVoRo7gsiun9FdcaTpzkM60nqzT8ip1659eQpB1SLyupscP.ec_wAGvXwkhCcTKCNHQMrxg-&format=png',
'friendly_name': 'Ikken Hissatsuu In Party',
'friendly_name': 'Ikken Hissatsuu In party',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.ikken_hissatsuu_in_party',
@@ -13,7 +13,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.erics273_account_tier',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -24,12 +24,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'erics273 Account Tier',
'original_name': 'Account tier',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.ACCOUNT_TIER: 'account_tier'>,
'unique_id': '2533274913657542_account_tier',
'unit_of_measurement': None,
})
@@ -37,8 +37,7 @@
# name: test_sensors[sensor.erics273_account_tier-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=rwljod2fPqLqGP3DBV9F_yK9iuxAt3_MH6tcOnQXTc8LY1LO8JeulzCEFHaqqItKdg9oJ84qjO.VNwvUWuq_iR5iTyx1gQsqHSvWLbqIrRI-&background=0xababab&format=png',
'friendly_name': 'erics273 Account Tier',
'friendly_name': 'erics273 Account tier',
}),
'context': <ANY>,
'entity_id': 'sensor.erics273_account_tier',
@@ -48,7 +47,7 @@
'state': 'Silver',
})
# ---
# name: test_sensors[sensor.erics273_gamer_score-entry]
# name: test_sensors[sensor.erics273_gamerscore-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
@@ -61,8 +60,8 @@
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.erics273_gamer_score',
'has_entity_name': False,
'entity_id': 'sensor.erics273_gamerscore',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -73,24 +72,24 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'erics273 Gamer Score',
'original_name': 'Gamerscore',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.GAMER_SCORE: 'gamer_score'>,
'unique_id': '2533274913657542_gamer_score',
'unit_of_measurement': None,
'unit_of_measurement': 'points',
})
# ---
# name: test_sensors[sensor.erics273_gamer_score-state]
# name: test_sensors[sensor.erics273_gamerscore-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=rwljod2fPqLqGP3DBV9F_yK9iuxAt3_MH6tcOnQXTc8LY1LO8JeulzCEFHaqqItKdg9oJ84qjO.VNwvUWuq_iR5iTyx1gQsqHSvWLbqIrRI-&background=0xababab&format=png',
'friendly_name': 'erics273 Gamer Score',
'friendly_name': 'erics273 Gamerscore',
'unit_of_measurement': 'points',
}),
'context': <ANY>,
'entity_id': 'sensor.erics273_gamer_score',
'entity_id': 'sensor.erics273_gamerscore',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
@@ -111,7 +110,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.erics273_gold_tenure',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -122,12 +121,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'erics273 Gold Tenure',
'original_name': 'Gold tenure',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.GOLD_TENURE: 'gold_tenure'>,
'unique_id': '2533274913657542_gold_tenure',
'unit_of_measurement': None,
})
@@ -135,8 +134,7 @@
# name: test_sensors[sensor.erics273_gold_tenure-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=rwljod2fPqLqGP3DBV9F_yK9iuxAt3_MH6tcOnQXTc8LY1LO8JeulzCEFHaqqItKdg9oJ84qjO.VNwvUWuq_iR5iTyx1gQsqHSvWLbqIrRI-&background=0xababab&format=png',
'friendly_name': 'erics273 Gold Tenure',
'friendly_name': 'erics273 Gold tenure',
}),
'context': <ANY>,
'entity_id': 'sensor.erics273_gold_tenure',
@@ -160,7 +158,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.erics273_status',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -171,12 +169,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'erics273 Status',
'original_name': 'Status',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.STATUS: 'status'>,
'unique_id': '2533274913657542_status',
'unit_of_measurement': None,
})
@@ -184,7 +182,6 @@
# name: test_sensors[sensor.erics273_status-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=rwljod2fPqLqGP3DBV9F_yK9iuxAt3_MH6tcOnQXTc8LY1LO8JeulzCEFHaqqItKdg9oJ84qjO.VNwvUWuq_iR5iTyx1gQsqHSvWLbqIrRI-&background=0xababab&format=png',
'friendly_name': 'erics273 Status',
}),
'context': <ANY>,
@@ -209,7 +206,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.gsr_ae_account_tier',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -220,12 +217,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'GSR Ae Account Tier',
'original_name': 'Account tier',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.ACCOUNT_TIER: 'account_tier'>,
'unique_id': '271958441785640_account_tier',
'unit_of_measurement': None,
})
@@ -233,8 +230,7 @@
# name: test_sensors[sensor.gsr_ae_account_tier-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3M0aLOK2kxE9mbLm9M2.R0stAQYoDsGCDJxqDzG9WF3oa4rOCjEK7DbZXdBmBWnMrfErA3M_Q4y_mUTEQLqSAEeYFGlGeCXYsccnQMvEecxRg-&format=png',
'friendly_name': 'GSR Ae Account Tier',
'friendly_name': 'GSR Ae Account tier',
}),
'context': <ANY>,
'entity_id': 'sensor.gsr_ae_account_tier',
@@ -244,7 +240,7 @@
'state': 'Gold',
})
# ---
# name: test_sensors[sensor.gsr_ae_gamer_score-entry]
# name: test_sensors[sensor.gsr_ae_gamerscore-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
@@ -257,8 +253,8 @@
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.gsr_ae_gamer_score',
'has_entity_name': False,
'entity_id': 'sensor.gsr_ae_gamerscore',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -269,24 +265,24 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'GSR Ae Gamer Score',
'original_name': 'Gamerscore',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.GAMER_SCORE: 'gamer_score'>,
'unique_id': '271958441785640_gamer_score',
'unit_of_measurement': None,
'unit_of_measurement': 'points',
})
# ---
# name: test_sensors[sensor.gsr_ae_gamer_score-state]
# name: test_sensors[sensor.gsr_ae_gamerscore-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3M0aLOK2kxE9mbLm9M2.R0stAQYoDsGCDJxqDzG9WF3oa4rOCjEK7DbZXdBmBWnMrfErA3M_Q4y_mUTEQLqSAEeYFGlGeCXYsccnQMvEecxRg-&format=png',
'friendly_name': 'GSR Ae Gamer Score',
'friendly_name': 'GSR Ae Gamerscore',
'unit_of_measurement': 'points',
}),
'context': <ANY>,
'entity_id': 'sensor.gsr_ae_gamer_score',
'entity_id': 'sensor.gsr_ae_gamerscore',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
@@ -307,7 +303,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.gsr_ae_gold_tenure',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -318,12 +314,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'GSR Ae Gold Tenure',
'original_name': 'Gold tenure',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.GOLD_TENURE: 'gold_tenure'>,
'unique_id': '271958441785640_gold_tenure',
'unit_of_measurement': None,
})
@@ -331,8 +327,7 @@
# name: test_sensors[sensor.gsr_ae_gold_tenure-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3M0aLOK2kxE9mbLm9M2.R0stAQYoDsGCDJxqDzG9WF3oa4rOCjEK7DbZXdBmBWnMrfErA3M_Q4y_mUTEQLqSAEeYFGlGeCXYsccnQMvEecxRg-&format=png',
'friendly_name': 'GSR Ae Gold Tenure',
'friendly_name': 'GSR Ae Gold tenure',
}),
'context': <ANY>,
'entity_id': 'sensor.gsr_ae_gold_tenure',
@@ -356,7 +351,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.gsr_ae_status',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -367,12 +362,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'GSR Ae Status',
'original_name': 'Status',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.STATUS: 'status'>,
'unique_id': '271958441785640_status',
'unit_of_measurement': None,
})
@@ -380,7 +375,6 @@
# name: test_sensors[sensor.gsr_ae_status-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3M0aLOK2kxE9mbLm9M2.R0stAQYoDsGCDJxqDzG9WF3oa4rOCjEK7DbZXdBmBWnMrfErA3M_Q4y_mUTEQLqSAEeYFGlGeCXYsccnQMvEecxRg-&format=png',
'friendly_name': 'GSR Ae Status',
}),
'context': <ANY>,
@@ -405,7 +399,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.ikken_hissatsuu_account_tier',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -416,12 +410,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Ikken Hissatsuu Account Tier',
'original_name': 'Account tier',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.ACCOUNT_TIER: 'account_tier'>,
'unique_id': '2533274838782903_account_tier',
'unit_of_measurement': None,
})
@@ -429,8 +423,7 @@
# name: test_sensors[sensor.ikken_hissatsuu_account_tier-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=7OTVnZUMVj4OV2zUUGecWvn3U00nQQLfK7_kwpANogj9vJpb.t4ZQMMLIWOuBZBBZs5MjD7okwh5Zwnit1SAtO3OAsFXxJc1ALIbaVoRo7gsiun9FdcaTpzkM60nqzT8ip1659eQpB1SLyupscP.ec_wAGvXwkhCcTKCNHQMrxg-&format=png',
'friendly_name': 'Ikken Hissatsuu Account Tier',
'friendly_name': 'Ikken Hissatsuu Account tier',
}),
'context': <ANY>,
'entity_id': 'sensor.ikken_hissatsuu_account_tier',
@@ -440,7 +433,7 @@
'state': 'Gold',
})
# ---
# name: test_sensors[sensor.ikken_hissatsuu_gamer_score-entry]
# name: test_sensors[sensor.ikken_hissatsuu_gamerscore-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
@@ -453,8 +446,8 @@
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.ikken_hissatsuu_gamer_score',
'has_entity_name': False,
'entity_id': 'sensor.ikken_hissatsuu_gamerscore',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -465,24 +458,24 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Ikken Hissatsuu Gamer Score',
'original_name': 'Gamerscore',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.GAMER_SCORE: 'gamer_score'>,
'unique_id': '2533274838782903_gamer_score',
'unit_of_measurement': None,
'unit_of_measurement': 'points',
})
# ---
# name: test_sensors[sensor.ikken_hissatsuu_gamer_score-state]
# name: test_sensors[sensor.ikken_hissatsuu_gamerscore-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=7OTVnZUMVj4OV2zUUGecWvn3U00nQQLfK7_kwpANogj9vJpb.t4ZQMMLIWOuBZBBZs5MjD7okwh5Zwnit1SAtO3OAsFXxJc1ALIbaVoRo7gsiun9FdcaTpzkM60nqzT8ip1659eQpB1SLyupscP.ec_wAGvXwkhCcTKCNHQMrxg-&format=png',
'friendly_name': 'Ikken Hissatsuu Gamer Score',
'friendly_name': 'Ikken Hissatsuu Gamerscore',
'unit_of_measurement': 'points',
}),
'context': <ANY>,
'entity_id': 'sensor.ikken_hissatsuu_gamer_score',
'entity_id': 'sensor.ikken_hissatsuu_gamerscore',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
@@ -503,7 +496,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.ikken_hissatsuu_gold_tenure',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -514,12 +507,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Ikken Hissatsuu Gold Tenure',
'original_name': 'Gold tenure',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.GOLD_TENURE: 'gold_tenure'>,
'unique_id': '2533274838782903_gold_tenure',
'unit_of_measurement': None,
})
@@ -527,8 +520,7 @@
# name: test_sensors[sensor.ikken_hissatsuu_gold_tenure-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=7OTVnZUMVj4OV2zUUGecWvn3U00nQQLfK7_kwpANogj9vJpb.t4ZQMMLIWOuBZBBZs5MjD7okwh5Zwnit1SAtO3OAsFXxJc1ALIbaVoRo7gsiun9FdcaTpzkM60nqzT8ip1659eQpB1SLyupscP.ec_wAGvXwkhCcTKCNHQMrxg-&format=png',
'friendly_name': 'Ikken Hissatsuu Gold Tenure',
'friendly_name': 'Ikken Hissatsuu Gold tenure',
}),
'context': <ANY>,
'entity_id': 'sensor.ikken_hissatsuu_gold_tenure',
@@ -552,7 +544,7 @@
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.ikken_hissatsuu_status',
'has_entity_name': False,
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
@@ -563,12 +555,12 @@
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Ikken Hissatsuu Status',
'original_name': 'Status',
'platform': 'xbox',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'translation_key': <XboxSensor.STATUS: 'status'>,
'unique_id': '2533274838782903_status',
'unit_of_measurement': None,
})
@@ -576,7 +568,6 @@
# name: test_sensors[sensor.ikken_hissatsuu_status-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=7OTVnZUMVj4OV2zUUGecWvn3U00nQQLfK7_kwpANogj9vJpb.t4ZQMMLIWOuBZBBZs5MjD7okwh5Zwnit1SAtO3OAsFXxJc1ALIbaVoRo7gsiun9FdcaTpzkM60nqzT8ip1659eQpB1SLyupscP.ec_wAGvXwkhCcTKCNHQMrxg-&format=png',
'friendly_name': 'Ikken Hissatsuu Status',
}),
'context': <ANY>,