Skip to content

Commit 54570a1

Browse files
committed
Use hass location as default in the config
1 parent 69fe54d commit 54570a1

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

custom_components/knmi/config_flow.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ async def _show_config_form(self, user_input): # pylint: disable=unused-argumen
6060
data_schema=vol.Schema(
6161
{
6262
vol.Required(CONF_NAME): str,
63-
vol.Required(CONF_LATITUDE): cv.latitude,
64-
vol.Required(CONF_LONGITUDE): cv.longitude,
63+
vol.Required(
64+
CONF_LATITUDE, default=self.hass.config.latitude
65+
): cv.latitude,
66+
vol.Required(
67+
CONF_LONGITUDE, default=self.hass.config.longitude
68+
): cv.longitude,
6569
vol.Required(CONF_API_KEY): str,
6670
}
6771
),

custom_components/knmi/const.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Base component constants.
1717
NAME = "KNMI"
1818
DOMAIN = "knmi"
19-
VERSION = "1.0.5"
19+
VERSION = "1.0.6"
2020
ATTRIBUTION = "KNMI Weergegevens via https://weerlive.nl/"
2121

2222
# Icons.

custom_components/knmi/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"documentation": "https://github.com/golles/ha-knmi/",
55
"iot_class": "cloud_polling",
66
"issue_tracker": "https://github.com/golles/ha-knmi//issues",
7-
"version": "1.0.5",
7+
"version": "1.0.6",
88
"config_flow": true,
99
"codeowners": [
1010
"@golles"

0 commit comments

Comments
 (0)