Make zone entries work without radius (#15032)
This commit is contained in:
parent
33ebd99068
commit
cbdfc95cc8
2 changed files with 2 additions and 3 deletions
|
@ -73,8 +73,8 @@ async def async_setup_entry(hass, config_entry):
|
|||
entry = config_entry.data
|
||||
name = entry[CONF_NAME]
|
||||
zone = Zone(hass, name, entry[CONF_LATITUDE], entry[CONF_LONGITUDE],
|
||||
entry.get(CONF_RADIUS), entry.get(CONF_ICON),
|
||||
entry.get(CONF_PASSIVE))
|
||||
entry.get(CONF_RADIUS, DEFAULT_RADIUS), entry.get(CONF_ICON),
|
||||
entry.get(CONF_PASSIVE, DEFAULT_PASSIVE))
|
||||
zone.entity_id = async_generate_entity_id(
|
||||
ENTITY_ID_FORMAT, name, None, hass)
|
||||
hass.async_add_job(zone.async_update_ha_state())
|
||||
|
|
|
@ -17,7 +17,6 @@ async def test_setup_entry_successful(hass):
|
|||
zone.CONF_NAME: 'Test Zone',
|
||||
zone.CONF_LATITUDE: 1.1,
|
||||
zone.CONF_LONGITUDE: -2.2,
|
||||
zone.CONF_RADIUS: 250,
|
||||
zone.CONF_RADIUS: True
|
||||
}
|
||||
hass.data[zone.DOMAIN] = {}
|
||||
|
|
Loading…
Add table
Reference in a new issue