[fix] styling

This commit is contained in:
Ramil Valitov 2024-11-08 13:39:30 +03:00
parent 31d3d16a68
commit 3083a88d4d
No known key found for this signature in database
GPG key ID: 2AB186DABDFE1914
2 changed files with 15 additions and 13 deletions

View file

@ -12,19 +12,21 @@ StatusBinarySensor = status_ns.class_(
"StatusBinarySensor", binary_sensor.BinarySensor, cg.Component "StatusBinarySensor", binary_sensor.BinarySensor, cg.Component
) )
CONFIG_SCHEMA = binary_sensor.binary_sensor_schema( CONFIG_SCHEMA = (
binary_sensor.binary_sensor_schema(
StatusBinarySensor, StatusBinarySensor,
device_class=DEVICE_CLASS_CONNECTIVITY, device_class=DEVICE_CLASS_CONNECTIVITY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC, entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
).extend(cv.COMPONENT_SCHEMA).extend( )
.extend(cv.COMPONENT_SCHEMA)
.extend(
cv.Schema( cv.Schema(
{ {
cv.GenerateID(CONF_STATUS_ID): cv.All( cv.GenerateID(CONF_STATUS_ID): cv.All(cv.requires_component("network")),
cv.requires_component("network")
),
} }
) )
) )
)
async def to_code(config): async def to_code(config):