Skip to content

Commit

Permalink
change import * to explicit imports for homeassistant.const
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed Feb 12, 2024
1 parent ce28da9 commit 45bb772
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Version 1.3.7 Import Cleanup
* Trial to remove import warnings (Reported Issue: https://github.com/grimmpp/home-assistant-eltako/issues/61)
* 🐞 Removed entity_id bug from GatewayConnectionState 🐞

## Version 1.3.6 Dependencies fixed for 1.3.5
* 🐞 Wrong dependency in manifest 🐞
Expand Down
8 changes: 4 additions & 4 deletions custom_components/eltako/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ async def async_setup_entry(

platform = Platform.BINARY_SENSOR

for platform in [Platform.BINARY_SENSOR, Platform.SENSOR]:
if platform in config:
for entity_config in config[platform]:
for platform_id in [Platform.BINARY_SENSOR, Platform.SENSOR]:
if platform_id in config:
for entity_config in config[platform_id]:
try:
dev_conf = config_helpers.DeviceConf(entity_config, [CONF_DEVICE_CLASS, CONF_INVERT_SIGNAL])
if dev_conf.eep.eep_string in CONF_EEP_SUPPORTED_BINARY_SENSOR:
entities.append(EltakoBinarySensor(platform, gateway, dev_conf.id, dev_conf.name, dev_conf.eep,
entities.append(EltakoBinarySensor(platform_id, gateway, dev_conf.id, dev_conf.name, dev_conf.eep,
dev_conf.get(CONF_DEVICE_CLASS), dev_conf.get(CONF_INVERT_SIGNAL)))

except Exception as e:
Expand Down
3 changes: 1 addition & 2 deletions custom_components/eltako/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
ClimateEntityFeature
)
from homeassistant import config_entries
from homeassistant.const import CONF_ID, CONF_NAME, Platform, TEMP_CELSIUS, CONF_TEMPERATURE_UNIT, Platform
from homeassistant.const import Platform, CONF_TEMPERATURE_UNIT, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.typing import ConfigType

from .gateway import EnOceanGateway
Expand Down

0 comments on commit 45bb772

Please sign in to comment.