Skip to content

Commit

Permalink
Fix Setup Config Flow for LaMetric SKY
Browse files Browse the repository at this point in the history
  • Loading branch information
spyfly committed May 24, 2023
1 parent f355f0c commit aaafeba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion homeassistant/components/lametric/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,20 @@ async def _async_step_create_entry(self, host: str, api_key: str) -> FlowResult:
updates={CONF_HOST: lametric.host, CONF_API_KEY: lametric.api_key}
)

notify_sound: Sound | None
if device.model == "sa5":
notify_sound = None
else:
notify_sound = Sound(sound=NotificationSound.WIN)

await lametric.notify(
notification=Notification(
priority=NotificationPriority.CRITICAL,
icon_type=NotificationIconType.INFO,
model=Model(
cycles=2,
frames=[Simple(text="Connected to Home Assistant!", icon=7956)],
sound=Sound(sound=NotificationSound.WIN),
sound=notify_sound,
),
)
)
Expand Down

0 comments on commit aaafeba

Please sign in to comment.