Public Access
Remove device class override in binary sensor config
Removed device class override for binary sensor configuration.
This commit is contained in:
1 parent
0a573bb602
commit
a71b90cf3e
1 file changed
-4
@@ -59,7 +59,3 @@ async def to_code(config):
|
|||||||
# Apply sensor type specific configuration
|
# Apply sensor type specific configuration
|
||||||
if sensor_type in BINARY_SENSOR_TYPES:
|
if sensor_type in BINARY_SENSOR_TYPES:
|
||||||
sensor_config = BINARY_SENSOR_TYPES[sensor_type]
|
sensor_config = BINARY_SENSOR_TYPES[sensor_type]
|
||||||
|
|
||||||
# Override config with sensor type defaults if not specified
|
|
||||||
if "device_class" not in config and "device_class" in sensor_config:
|
|
||||||
cg.add(var.set_device_class(sensor_config["device_class"]))
|
|
||||||
Reference in new issue
Block a user