Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change import * to explicit imports for homeassistant.const #64

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/eltako/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant import config_entries
from homeassistant.const import *
from homeassistant.const import CONF_DEVICE_CLASS
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.entity import DeviceInfo
Expand Down
2 changes: 1 addition & 1 deletion custom_components/eltako/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"issue_tracker": "https://github.com/grimmpp/home-assistant-eltako/issues",
"loggers": ["eltako"],
"requirements": ["eltako14bus==0.0.45","enocean==0.60.1", "StrEnum"],
"version": "1.2.3"
"version": "1.3.7"
}
1 change: 1 addition & 0 deletions tests/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self) -> None:
class GatewayMock():

def __init__(self, general_settings:dict=DEFAULT_GENERAL_SETTINGS, dev_id: int=123, base_id:AddressExpression=AddressExpression.parse('FF-AA-80-00')):
self.hass = HassMock()
self.general_settings = general_settings
self.base_id = base_id
self.dev_id = dev_id
3 changes: 2 additions & 1 deletion tests/test_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# mock update of Home Assistant
EnOceanGateway._register_device = mock.Mock(return_value=None)
EnOceanGateway._init_bus = mock.Mock(return_value=None)
RS485SerialInterface.__init__ = mock.Mock(return_value=None)
asyncio.get_event_loop = mock.Mock(return_value=None)

Expand All @@ -31,7 +32,7 @@ def test_gateway_creation(self):

self.assertEquals(gw.identifier, basename(normpath('serial_path')))
self.assertEquals(gw.general_settings, DEFAULT_GENERAL_SETTINGS)
self.assertEquals(gw.model, "EnOcean ESP2 Gateway - FAM14")
self.assertEquals(gw.model, "EnOcean Gateway - FAM14")
self.assertEquals(gw.dev_id, 123)
self.assertEquals(gw.dev_type, sub_type)
self.assertEquals(gw.dev_name, 'GW - fam14 (Id: 123, BaseId: FF-AA-00-00)')
Expand Down
Loading