Add reboot button to SFRBox (#86514)

This commit is contained in:
epenet 2023-01-24 14:13:49 +01:00 committed by GitHub
parent 44beb350cd
commit e96cea997e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 197 additions and 2 deletions

View file

@ -1,5 +1,6 @@
"""Constants for SFR Box tests."""
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.button import ButtonDeviceClass
from homeassistant.components.sensor import (
ATTR_OPTIONS,
ATTR_STATE_CLASS,
@ -18,6 +19,7 @@ from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT,
SIGNAL_STRENGTH_DECIBELS,
STATE_ON,
STATE_UNKNOWN,
Platform,
UnitOfDataRate,
UnitOfElectricPotential,
@ -48,6 +50,14 @@ EXPECTED_ENTITIES = {
ATTR_UNIQUE_ID: "e4:5d:51:00:11:22_dsl_status",
},
],
Platform.BUTTON: [
{
ATTR_DEVICE_CLASS: ButtonDeviceClass.RESTART,
ATTR_ENTITY_ID: "button.sfr_box_reboot",
ATTR_STATE: STATE_UNKNOWN,
ATTR_UNIQUE_ID: "e4:5d:51:00:11:22_system_reboot",
},
],
Platform.SENSOR: [
{
ATTR_DEFAULT_DISABLED: True,