Add entity translations to Litterrobot (#95316)

This commit is contained in:
Robert Hillis 2023-06-27 04:12:02 -04:00 committed by GitHub
parent c3d02d68b7
commit 7add36d847
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 86 additions and 20 deletions

View file

@ -36,13 +36,13 @@ class RobotSwitchEntityDescription(SwitchEntityDescription, RequiredKeysMixin[_R
ROBOT_SWITCHES = [
RobotSwitchEntityDescription[LitterRobot | FeederRobot](
key="night_light_mode_enabled",
name="Night light mode",
translation_key="night_light_mode",
icons=("mdi:lightbulb-on", "mdi:lightbulb-off"),
set_fn=lambda robot, value: robot.set_night_light(value),
),
RobotSwitchEntityDescription[LitterRobot | FeederRobot](
key="panel_lock_enabled",
name="Panel lockout",
translation_key="panel_lockout",
icons=("mdi:lock", "mdi:lock-open"),
set_fn=lambda robot, value: robot.set_panel_lockout(value),
),