style: code style

This commit is contained in:
LiShuzhen 2025-07-09 14:11:18 +08:00
parent cb585b88bd
commit 61aab623ca

View File

@ -50,18 +50,11 @@ from homeassistant.components.sensor import SensorStateClass
from homeassistant.components.event import EventDeviceClass from homeassistant.components.event import EventDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.const import ( from homeassistant.const import (CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, EntityCategory, LIGHT_LUX, UnitOfEnergy,
EntityCategory, UnitOfPower, UnitOfElectricCurrent,
LIGHT_LUX, UnitOfElectricPotential, UnitOfTemperature,
UnitOfEnergy, UnitOfPressure, PERCENTAGE)
UnitOfPower,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfTemperature,
UnitOfPressure,
PERCENTAGE
)
# pylint: disable=pointless-string-statement # pylint: disable=pointless-string-statement
"""SPEC_DEVICE_TRANS_MAP """SPEC_DEVICE_TRANS_MAP
@ -161,9 +154,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'optional': { 'optional': {
'properties': {'status', 'fan-level'}, 'properties': {'status', 'fan-level'},
'actions': { 'actions': {
'pause-sweeping', 'pause-sweeping', 'continue-sweep', 'stop-and-gocharge'
'continue-sweep',
'stop-and-gocharge'
} }
} }
} }
@ -204,10 +195,9 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'required': {}, 'required': {},
'optional': { 'optional': {
'properties': { 'properties': {
'on', 'on', 'fan-level', 'horizontal-swing', 'vertical-swing'
'fan-level', }
'horizontal-swing', }
'vertical-swing'}}
}, },
'environment': { 'environment': {
'required': {}, 'required': {},
@ -235,8 +225,8 @@ SPEC_DEVICE_TRANS_MAP: dict = {
}, },
'optional': { 'optional': {
'properties': { 'properties': {
'target-temperature', 'mode', 'fan-level', 'target-temperature', 'mode', 'fan-level', 'temperature'
'temperature'} }
} }
} }
}, },
@ -434,9 +424,7 @@ SPEC_SERVICE_TRANS_MAP: dict = {
} }
}, },
'optional': { 'optional': {
'properties': { 'properties': {'mode', 'brightness', 'color', 'color-temperature'}
'mode', 'brightness', 'color', 'color-temperature'
}
}, },
'entity': 'light' 'entity': 'light'
}, },
@ -451,7 +439,8 @@ SPEC_SERVICE_TRANS_MAP: dict = {
}, },
'optional': { 'optional': {
'properties': { 'properties': {
'mode', 'brightness', 'mode',
'brightness',
} }
}, },
'entity': 'light', 'entity': 'light',
@ -491,9 +480,7 @@ SPEC_SERVICE_TRANS_MAP: dict = {
} }
}, },
'optional': { 'optional': {
'properties': { 'properties': {'status', 'current-position', 'target-position'}
'status', 'current-position', 'target-position'
}
}, },
'entity': 'cover' 'entity': 'cover'
}, },
@ -683,6 +670,4 @@ SPEC_EVENT_TRANS_MAP: dict[str, str] = {
'doorbell-ring': EventDeviceClass.DOORBELL 'doorbell-ring': EventDeviceClass.DOORBELL
} }
SPEC_ACTION_TRANS_MAP = { SPEC_ACTION_TRANS_MAP = {}
}