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
Zone - Hass configuration name is optional #14449
Conversation
|
||
if HOME_ZONE not in hass.data[DOMAIN] and HOME_ZONE not in zone_entries: | ||
name = hass.config.location_name | ||
if name is None: |
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.
It's possible apply a proper default to location_name
?
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.
That is hass own parameter. This is how the old logic worked. I just missed this use case
…, where many zones can have the same name
tests/components/zone/test_init.py
Outdated
'latitude': 1.1, | ||
'longitude': -2.2, | ||
} | ||
assert setup.setup_component(self.hass, zone.DOMAIN, {'zone': [info, info]}) |
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.
line too long (84 > 79 characters)
* Hass configuration name is optional * Check explicitly if name is none * Reverted back to old logic for zones configured in configuration.yaml, where many zones can have the same name * New test to verify use case of allowing multiple zones having the same name * Fix too long line
Description:
Hass configuration option name is optional, make sure there is a name for the home zone
Related issue (if applicable): fixes #14396
Checklist:
tox
. Your PR cannot be merged unless tests pass