Daly BMS improvements (#3388)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Samuel Sieb <samuel-github@sieb.net>
This commit is contained in:
matthias882
2023-08-10 07:05:01 +02:00
committed by GitHub
parent 0ed0bdc655
commit 5b0b9da0b9
6 changed files with 217 additions and 180 deletions
+2 -3
View File
@@ -23,9 +23,8 @@ CONFIG_SCHEMA = cv.All(
async def setup_conf(config, key, hub):
if key in config:
conf = config[key]
sens = await text_sensor.new_text_sensor(conf)
if sensor_config := config.get(key):
sens = await text_sensor.new_text_sensor(sensor_config)
cg.add(getattr(hub, f"set_{key}_text_sensor")(sens))