Skip to content

Commit

Permalink
Compatibity with current Home Assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
ldotlopez committed Jul 24, 2023
1 parent 2b9803a commit af63a0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions custom_components/hnap_device/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"hnap>=1.0.0,<2.0.0"
],
"ssdp" : [],
"version" : "1.0.0",
"version" : "1.1.0",
"zeroconf" : []
}
}
14 changes: 5 additions & 9 deletions custom_components/hnap_device/siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,9 @@

import hnap
import requests.exceptions
from homeassistant.components.siren import (
SUPPORT_DURATION,
SUPPORT_TONES,
SUPPORT_TURN_OFF,
SUPPORT_TURN_ON,
SUPPORT_VOLUME_SET,
SirenEntity,
)
from homeassistant.components.siren import (SUPPORT_DURATION, SUPPORT_TONES,
SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
SUPPORT_VOLUME_SET, SirenEntity)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
Expand Down Expand Up @@ -99,7 +94,8 @@ async def async_setup_entry(
unique_id=f"{config_entry.entry_id}-{PLATFORM}",
device_info=device_info,
device=device,
auto_reboot=config_entry.options[CONF_AUTO_REBOOT],
# FIXME: upgrade config version
auto_reboot=config_entry.options.get(CONF_AUTO_REBOOT, False),
)
],
update_before_add=True,
Expand Down
5 changes: 3 additions & 2 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "HNAP device",
"render_readme": true,
"content_in_root": false
}
"content_in_root": false,
"homeassistant": "2023.6.0",
}

0 comments on commit af63a0e

Please sign in to comment.