Use EntityCategory enum for MusicCast entity types (#62303)

This commit is contained in:
micha91 2021-12-21 18:56:13 +01:00 committed by GitHub
parent eb292fbfbd
commit 0540c9455d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 11 deletions

View File

@ -9,11 +9,7 @@ from homeassistant.components.media_player.const import (
REPEAT_MODE_OFF, REPEAT_MODE_OFF,
REPEAT_MODE_ONE, REPEAT_MODE_ONE,
) )
from homeassistant.const import ( from homeassistant.helpers.entity import EntityCategory
ENTITY_CATEGORY_CONFIG,
ENTITY_CATEGORY_DIAGNOSTIC,
ENTITY_CATEGORY_SYSTEM,
)
DOMAIN = "yamaha_musiccast" DOMAIN = "yamaha_musiccast"
@ -51,10 +47,9 @@ MEDIA_CLASS_MAPPING = {
} }
ENTITY_CATEGORY_MAPPING = { ENTITY_CATEGORY_MAPPING = {
EntityType.CONFIG: ENTITY_CATEGORY_CONFIG, EntityType.CONFIG: EntityCategory.CONFIG,
EntityType.REGULAR: None, EntityType.REGULAR: None,
EntityType.DIAGNOSTIC: ENTITY_CATEGORY_DIAGNOSTIC, EntityType.DIAGNOSTIC: EntityCategory.DIAGNOSTIC,
EntityType.SYSTEM: ENTITY_CATEGORY_SYSTEM,
} }
DEVICE_CLASS_MAPPING = { DEVICE_CLASS_MAPPING = {

View File

@ -4,7 +4,7 @@
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/yamaha_musiccast", "documentation": "https://www.home-assistant.io/integrations/yamaha_musiccast",
"requirements": [ "requirements": [
"aiomusiccast==0.14.2" "aiomusiccast==0.14.3"
], ],
"ssdp": [ "ssdp": [
{ {

View File

@ -219,7 +219,7 @@ aiolyric==1.0.8
aiomodernforms==0.1.8 aiomodernforms==0.1.8
# homeassistant.components.yamaha_musiccast # homeassistant.components.yamaha_musiccast
aiomusiccast==0.14.2 aiomusiccast==0.14.3
# homeassistant.components.nanoleaf # homeassistant.components.nanoleaf
aionanoleaf==0.1.1 aionanoleaf==0.1.1

View File

@ -152,7 +152,7 @@ aiolyric==1.0.8
aiomodernforms==0.1.8 aiomodernforms==0.1.8
# homeassistant.components.yamaha_musiccast # homeassistant.components.yamaha_musiccast
aiomusiccast==0.14.2 aiomusiccast==0.14.3
# homeassistant.components.nanoleaf # homeassistant.components.nanoleaf
aionanoleaf==0.1.1 aionanoleaf==0.1.1