Add entity categories for appropriate Ambient PWS entities (#58100)

This commit is contained in:
Aaron Bach 2021-10-20 16:17:28 -06:00 committed by GitHub
parent 388761922b
commit 38586d2cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntityDescription, BinarySensorEntityDescription,
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_NAME from homeassistant.const import ATTR_NAME, ENTITY_CATEGORY_DIAGNOSTIC
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -63,144 +63,168 @@ BINARY_SENSOR_DESCRIPTIONS = (
key=TYPE_BATTOUT, key=TYPE_BATTOUT,
name="Battery", name="Battery",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT1, key=TYPE_BATT1,
name="Battery 1", name="Battery 1",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT2, key=TYPE_BATT2,
name="Battery 2", name="Battery 2",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT3, key=TYPE_BATT3,
name="Battery 3", name="Battery 3",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT4, key=TYPE_BATT4,
name="Battery 4", name="Battery 4",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT5, key=TYPE_BATT5,
name="Battery 5", name="Battery 5",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT6, key=TYPE_BATT6,
name="Battery 6", name="Battery 6",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT7, key=TYPE_BATT7,
name="Battery 7", name="Battery 7",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT8, key=TYPE_BATT8,
name="Battery 8", name="Battery 8",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT9, key=TYPE_BATT9,
name="Battery 9", name="Battery 9",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT10, key=TYPE_BATT10,
name="Battery 10", name="Battery 10",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_BATT_CO2, key=TYPE_BATT_CO2,
name="CO2 Battery", name="CO2 Battery",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_PM25IN_BATT, key=TYPE_PM25IN_BATT,
name="PM25 Indoor Battery", name="PM25 Indoor Battery",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_PM25_BATT, key=TYPE_PM25_BATT,
name="PM25 Battery", name="PM25 Battery",
device_class=DEVICE_CLASS_BATTERY, device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=0, on_state=0,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY1, key=TYPE_RELAY1,
name="Relay 1", name="Relay 1",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY2, key=TYPE_RELAY2,
name="Relay 2", name="Relay 2",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY3, key=TYPE_RELAY3,
name="Relay 3", name="Relay 3",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY4, key=TYPE_RELAY4,
name="Relay 4", name="Relay 4",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY5, key=TYPE_RELAY5,
name="Relay 5", name="Relay 5",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY6, key=TYPE_RELAY6,
name="Relay 6", name="Relay 6",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY7, key=TYPE_RELAY7,
name="Relay 7", name="Relay 7",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY8, key=TYPE_RELAY8,
name="Relay 8", name="Relay 8",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY9, key=TYPE_RELAY9,
name="Relay 9", name="Relay 9",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
AmbientBinarySensorDescription( AmbientBinarySensorDescription(
key=TYPE_RELAY10, key=TYPE_RELAY10,
name="Relay 10", name="Relay 10",
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
on_state=1, on_state=1,
), ),
) )