Skip to content

Commit

Permalink
fix fwm valve
Browse files Browse the repository at this point in the history
  • Loading branch information
LavermanJJ committed Mar 1, 2024
1 parent 6914e1d commit cae9f02
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/solarfocus/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ async def async_setup_entry(
entity = SolarfocusBinarySensorEntity(coordinator, _description)
entities.append(entity)

if config_entry.options[CONF_FRESH_WATER_MODULE]:
for i in range(config_entry.options[CONF_FRESH_WATER_MODULE]):
for description in FRESH_WATER_MODULE_BINARY_SENSOR_TYPES:
_description = create_description(
FRESH_WATER_MODULE_PREFIX,
FRESH_WATER_MODULE_COMPONENT,
FRESH_WATER_MODULE_COMPONENT_PREFIX,
"",
str(i + 1),
description,
)

Expand Down Expand Up @@ -233,7 +233,6 @@ def is_on(self):
PHOTOVOLTAIC_BINARY_SENSOR_TYPES = [
SolarfocusBinarySensorEntityDescription(
key="overcharge_possible",
device_class=BinarySensorDeviceClass.POWER,
on_state="1",
),
SolarfocusBinarySensorEntityDescription(
Expand Down

0 comments on commit cae9f02

Please sign in to comment.