Update __init__.py

This commit is contained in:
Daniël Koek 2024-09-25 16:01:15 +01:00
parent d0151946a5
commit 12dc2ca591

View file

@ -1,4 +1,5 @@
import esphome.codegen as cg import esphome.codegen as cg
from esphome.components import sensor
import esphome.config_validation as cv import esphome.config_validation as cv
from esphome import pins from esphome import pins
from esphome.components.binary_sensor import BinarySensor from esphome.components.binary_sensor import BinarySensor
@ -153,7 +154,7 @@ CONFIG_SCHEMA = cv.All(
sensor_validation(BinarySensor) sensor_validation(BinarySensor)
), ),
# if you want to see the rssi # if you want to see the rssi
cv.Optional(CONF_LORA_RSSI): Sensor.sensor_schema( cv.Optional(CONF_LORA_RSSI): sensor.sensor_schema(
device_class=DEVICE_CLASS_SIGNAL_STRENGTH, device_class=DEVICE_CLASS_SIGNAL_STRENGTH,
unit_of_measurement=UNIT_PERCENT, unit_of_measurement=UNIT_PERCENT,
accuracy_decimals=1, accuracy_decimals=1,