Add entity translations to dormakaba (#95230)
This commit is contained in:
parent
3f0393154e
commit
1525901ffc
3 changed files with 8 additions and 3 deletions
|
@ -39,13 +39,12 @@ class DormakabaDkeyBinarySensorDescription(
|
|||
BINARY_SENSOR_DESCRIPTIONS = (
|
||||
DormakabaDkeyBinarySensorDescription(
|
||||
key="door_position",
|
||||
name="Door",
|
||||
device_class=BinarySensorDeviceClass.DOOR,
|
||||
is_on=lambda state: state.door_position == DoorPosition.OPEN,
|
||||
),
|
||||
DormakabaDkeyBinarySensorDescription(
|
||||
key="security_locked",
|
||||
name="Deadbolt",
|
||||
translation_key="deadbolt",
|
||||
device_class=BinarySensorDeviceClass.LOCK,
|
||||
is_on=lambda state: state.unlock_status
|
||||
not in (UnlockStatus.SECURITY_LOCKED, UnlockStatus.UNLOCKED_SECURITY_LOCKED),
|
||||
|
|
|
@ -22,7 +22,6 @@ from .models import DormakabaDkeyData
|
|||
BINARY_SENSOR_DESCRIPTIONS = (
|
||||
SensorEntityDescription(
|
||||
key="battery_level",
|
||||
name="Battery",
|
||||
device_class=SensorDeviceClass.BATTERY,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
|
|
|
@ -33,5 +33,12 @@
|
|||
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]",
|
||||
"unknown": "[%key:common::config_flow::error::unknown%]"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"deadbolt": {
|
||||
"name": "Deadbolt"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue