Skip to content

Commit

Permalink
fix: code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
EuleMitKeule committed May 10, 2023
1 parent 5ca151f commit 45c87be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Run isort
run: |
python -m isort --check-only --diff custom_components/template_media_player
python -m isort --check-only --diff --profile black custom_components/template_media_player
mypy:
runs-on: ubuntu-latest
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Run mypy
run: |
python -m mypy custom_components/template_media_player
python -m mypy custom_components/template_media_player --ignore-missing-imports
bandit:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion custom_components/template_media_player/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

# Attributes Templates

CONF_ACCESS_TOKEN_TEMPLATE = "access_token"
CONF_ANNOUNCE_TEMPLATE = "announce"
CONF_APP_ID_TEMPLATE = "app_id"
CONF_APP_NAME_TEMPLATE = "app_name"
Expand Down
9 changes: 3 additions & 6 deletions custom_components/template_media_player/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import logging
from typing import Any, Optional

import homeassistant.helpers.config_validation as cv
import voluptuous as vol

from homeassistant.components.media_player import DOMAIN as DOMAIN_MEDIA_PLAYER
from homeassistant.components.media_player import (
DOMAIN as DOMAIN_MEDIA_PLAYER,
ENTITY_ID_FORMAT,
PLATFORM_SCHEMA,
MediaPlayerDeviceClass,
Expand All @@ -22,7 +22,6 @@
from homeassistant.const import ATTR_FRIENDLY_NAME, CONF_ENTITY_PICTURE_TEMPLATE
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import TemplateError
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import async_generate_entity_id
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.entity_platform import AddEntitiesCallback
Expand Down Expand Up @@ -125,9 +124,7 @@ async def _async_create_entities(hass: HomeAssistant, config: ConfigType):
browse_media_entity_id: str | None = media_player_config.get(
CONF_BROWSE_MEDIA_ENTITY_ID
)
global_template: Template | None = media_player_config.get(
CONF_GLOBAL_TEMPLATE
)
global_template: Template | None = media_player_config.get(CONF_GLOBAL_TEMPLATE)
availability_template: Template | None = media_player_config.get(
CONF_AVAILABILITY_TEMPLATE
)
Expand Down

0 comments on commit 45c87be

Please sign in to comment.