Skip to content

Commit

Permalink
Fix situation where momentary is in config but there are no switches. (
Browse files Browse the repository at this point in the history
  • Loading branch information
twrecked authored Jun 2, 2024
1 parent fc87266 commit 139a6b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0.7.0b9:
handle no switches defined better
0.7.0b8:
fix async callback issue
0.7.0a7:
Expand Down
4 changes: 2 additions & 2 deletions custom_components/momentary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from .cfg import BlendedCfg


__version__ = "0.7.0b8"
__version__ = "0.7.0b9"

_LOGGER = logging.getLogger(__name__)

Expand All @@ -42,7 +42,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
hass.config_entries.flow.async_init(
COMPONENT_DOMAIN,
context={CONF_SOURCE: SOURCE_IMPORT},
data=config[Platform.SWITCH]
data=config.get(Platform.SWITCH, [])
)
)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/momentary/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/twrecked/hass-momentary/issues",
"requirements": [],
"version": "0.7.0b8"
"version": "0.7.0b9"
}

0 comments on commit 139a6b1

Please sign in to comment.