mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Rename xbox base entity module (#126540)
This commit is contained in:
parent
77b2895b0e
commit
58770e5c79
@ -10,9 +10,9 @@ from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .base_sensor import XboxBaseSensorEntity
|
||||
from .const import DOMAIN
|
||||
from .coordinator import XboxUpdateCoordinator
|
||||
from .entity import XboxBaseEntity
|
||||
|
||||
PRESENCE_ATTRIBUTES = ["online", "in_party", "in_game", "in_multiplayer"]
|
||||
|
||||
@ -32,7 +32,7 @@ async def async_setup_entry(
|
||||
update_friends()
|
||||
|
||||
|
||||
class XboxBinarySensorEntity(XboxBaseSensorEntity, BinarySensorEntity):
|
||||
class XboxBinarySensorEntity(XboxBaseEntity, BinarySensorEntity):
|
||||
"""Representation of a Xbox presence state."""
|
||||
|
||||
@property
|
||||
|
@ -11,7 +11,7 @@ from .const import DOMAIN
|
||||
from .coordinator import PresenceData, XboxUpdateCoordinator
|
||||
|
||||
|
||||
class XboxBaseSensorEntity(CoordinatorEntity[XboxUpdateCoordinator]):
|
||||
class XboxBaseEntity(CoordinatorEntity[XboxUpdateCoordinator]):
|
||||
"""Base Sensor for the Xbox Integration."""
|
||||
|
||||
def __init__(
|
@ -10,9 +10,9 @@ from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .base_sensor import XboxBaseSensorEntity
|
||||
from .const import DOMAIN
|
||||
from .coordinator import XboxUpdateCoordinator
|
||||
from .entity import XboxBaseEntity
|
||||
|
||||
SENSOR_ATTRIBUTES = ["status", "gamer_score", "account_tier", "gold_tenure"]
|
||||
|
||||
@ -34,7 +34,7 @@ async def async_setup_entry(
|
||||
update_friends()
|
||||
|
||||
|
||||
class XboxSensorEntity(XboxBaseSensorEntity, SensorEntity):
|
||||
class XboxSensorEntity(XboxBaseEntity, SensorEntity):
|
||||
"""Representation of a Xbox presence state."""
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user