File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
homeassistant/components/ntfy Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -146,20 +146,20 @@ async def ws_connect(self) -> None:
146146 )
147147 self ._attr_available = False
148148 finally :
149- if self ._ws is None or self ._ws .done ():
150- self ._ws = self .config_entry .async_create_background_task (
151- self .hass ,
152- target = self .ntfy .subscribe (
153- topics = [self .topic ],
154- callback = self ._async_handle_event ,
155- title = self .subentry .data .get (CONF_TITLE ),
156- message = self .subentry .data .get (CONF_MESSAGE ),
157- priority = self .subentry .data .get (CONF_PRIORITY ),
158- tags = self .subentry .data .get (CONF_TAGS ),
159- ),
160- name = "ntfy_websocket" ,
161- )
162149 self .async_write_ha_state ()
150+ if self ._ws is None or self ._ws .done ():
151+ self ._ws = self .config_entry .async_create_background_task (
152+ self .hass ,
153+ target = self .ntfy .subscribe (
154+ topics = [self .topic ],
155+ callback = self ._async_handle_event ,
156+ title = self .subentry .data .get (CONF_TITLE ),
157+ message = self .subentry .data .get (CONF_MESSAGE ),
158+ priority = self .subentry .data .get (CONF_PRIORITY ),
159+ tags = self .subentry .data .get (CONF_TAGS ),
160+ ),
161+ name = "ntfy_websocket" ,
162+ )
163163 await asyncio .sleep (RECONNECT_INTERVAL )
164164
165165 @property
You can’t perform that action at this time.
0 commit comments