-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Set station name as device name in GIOS #155762
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
base: dev
Are you sure you want to change the base?
Changes from 4 commits
ce9f7b3
b6d67da
f73ade1
1fda7d6
61d4b7b
383bf35
dbdfc29
a67088f
48fbbc4
d1a8f68
e7461c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -12,10 +12,12 @@ | |||
| from gios.model import GiosSensors | ||||
|
|
||||
| from homeassistant.config_entries import ConfigEntry | ||||
| from homeassistant.const import CONF_NAME | ||||
| from homeassistant.core import HomeAssistant | ||||
| from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo | ||||
| from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed | ||||
|
|
||||
| from .const import API_TIMEOUT, DOMAIN, SCAN_INTERVAL | ||||
| from .const import API_TIMEOUT, DOMAIN, MANUFACTURER, SCAN_INTERVAL, URL | ||||
|
|
||||
| _LOGGER = logging.getLogger(__name__) | ||||
|
|
||||
|
|
@@ -51,6 +53,18 @@ def __init__( | |||
| update_interval=SCAN_INTERVAL, | ||||
| ) | ||||
|
|
||||
| station_id = gios.station_id | ||||
| assert station_id is not None | ||||
|
||||
| gios = await Gios.create(websession, station_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added if TYPE_CHECKING to avoid this code in production code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name was removed here, but not removed from the translations file (string.json), which still needs to be cleaned up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Removed.