From 3083a88d4d8ca944cb18410a12140863bb9a4a96 Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Fri, 8 Nov 2024 13:39:30 +0300 Subject: [PATCH] [fix] styling --- esphome/components/status/__init__.py | 2 +- esphome/components/status/binary_sensor.py | 26 ++++++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/esphome/components/status/__init__.py b/esphome/components/status/__init__.py index f0eaa140be..8fe6ac40b7 100644 --- a/esphome/components/status/__init__.py +++ b/esphome/components/status/__init__.py @@ -1,2 +1,2 @@ DEPENDENCIES = ["network"] -CONF_STATUS_ID = "status_id" \ No newline at end of file +CONF_STATUS_ID = "status_id" diff --git a/esphome/components/status/binary_sensor.py b/esphome/components/status/binary_sensor.py index b050c0b6ae..7b524ed7e5 100644 --- a/esphome/components/status/binary_sensor.py +++ b/esphome/components/status/binary_sensor.py @@ -12,19 +12,21 @@ StatusBinarySensor = status_ns.class_( "StatusBinarySensor", binary_sensor.BinarySensor, cg.Component ) -CONFIG_SCHEMA = binary_sensor.binary_sensor_schema( - StatusBinarySensor, - device_class=DEVICE_CLASS_CONNECTIVITY, - entity_category=ENTITY_CATEGORY_DIAGNOSTIC, -).extend(cv.COMPONENT_SCHEMA).extend( - cv.Schema( - { - cv.GenerateID(CONF_STATUS_ID): cv.All( - cv.requires_component("network") - ), - } - ) +CONFIG_SCHEMA = ( + binary_sensor.binary_sensor_schema( + StatusBinarySensor, + device_class=DEVICE_CLASS_CONNECTIVITY, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, + ) + .extend(cv.COMPONENT_SCHEMA) + .extend( + cv.Schema( + { + cv.GenerateID(CONF_STATUS_ID): cv.All(cv.requires_component("network")), + } ) + ) +) async def to_code(config):