mirror of
https://github.com/esphome/esphome.git
synced 2025-09-30 00:52:20 +01:00
add-black (#1593)
* Add black Update pre commit Update pre commit add empty line * Format with black
This commit is contained in:
committed by
GitHub
parent
2b60b0f1fa
commit
69879920eb
@@ -1,17 +1,28 @@
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import sensor
|
||||
from esphome.const import CONF_ID, DEVICE_CLASS_SIGNAL_STRENGTH, ICON_EMPTY, UNIT_DECIBEL
|
||||
from esphome.const import (
|
||||
CONF_ID,
|
||||
DEVICE_CLASS_SIGNAL_STRENGTH,
|
||||
ICON_EMPTY,
|
||||
UNIT_DECIBEL,
|
||||
)
|
||||
|
||||
DEPENDENCIES = ['wifi']
|
||||
wifi_signal_ns = cg.esphome_ns.namespace('wifi_signal')
|
||||
WiFiSignalSensor = wifi_signal_ns.class_('WiFiSignalSensor', sensor.Sensor, cg.PollingComponent)
|
||||
DEPENDENCIES = ["wifi"]
|
||||
wifi_signal_ns = cg.esphome_ns.namespace("wifi_signal")
|
||||
WiFiSignalSensor = wifi_signal_ns.class_(
|
||||
"WiFiSignalSensor", sensor.Sensor, cg.PollingComponent
|
||||
)
|
||||
|
||||
CONFIG_SCHEMA = sensor.sensor_schema(
|
||||
UNIT_DECIBEL, ICON_EMPTY, 0, DEVICE_CLASS_SIGNAL_STRENGTH
|
||||
).extend({
|
||||
cv.GenerateID(): cv.declare_id(WiFiSignalSensor),
|
||||
}).extend(cv.polling_component_schema('60s'))
|
||||
CONFIG_SCHEMA = (
|
||||
sensor.sensor_schema(UNIT_DECIBEL, ICON_EMPTY, 0, DEVICE_CLASS_SIGNAL_STRENGTH)
|
||||
.extend(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(WiFiSignalSensor),
|
||||
}
|
||||
)
|
||||
.extend(cv.polling_component_schema("60s"))
|
||||
)
|
||||
|
||||
|
||||
def to_code(config):
|
||||
|
Reference in New Issue
Block a user