Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MQTT notify platform #64728

Merged
merged 29 commits into from
Mar 8, 2022
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8b94d41
Mqtt Notify service draft
jbouwh Jan 15, 2022
47beff3
fix updates
jbouwh Jan 21, 2022
a99481b
Remove TARGET config parameter
jbouwh Jan 22, 2022
9298aec
do not use protected attributes
jbouwh Jan 22, 2022
9c83c04
complete tests
jbouwh Jan 22, 2022
c589a7b
device support for auto discovery
jbouwh Jan 23, 2022
9fad9ba
Add targets attribute and support for data param
jbouwh Jan 23, 2022
60a468e
Add tests and resolve naming issues
jbouwh Jan 23, 2022
6f26585
CONF_COMMAND_TEMPLATE from .const
jbouwh Jan 23, 2022
197b5d8
Use mqtt as default service name
jbouwh Jan 24, 2022
7ddaff3
make sure service has a unique name
jbouwh Jan 24, 2022
98768bb
pylint error
jbouwh Jan 26, 2022
e2b0d1f
fix type error
jbouwh Jan 26, 2022
2282707
Conditional device removal and test
jbouwh Feb 5, 2022
70c566e
Improve tests
jbouwh Feb 6, 2022
e589d18
update description has_notify_services()
jbouwh Feb 6, 2022
2e9fc9a
Use TypedDict for service config
jbouwh Feb 16, 2022
d48f3d4
casting- fix discovery - hass.data
jbouwh Feb 16, 2022
a65d5e3
cleanup
jbouwh Feb 16, 2022
0a98578
move MqttNotificationConfig after the schemas
jbouwh Feb 16, 2022
2813e70
fix has_notify_services
jbouwh Feb 17, 2022
24bc032
do not test log for reg update
jbouwh Feb 17, 2022
f5c3f5d
Improve casting types
jbouwh Feb 17, 2022
1baf4a1
Simplify obtaining the device_id
jbouwh Feb 17, 2022
ac7cb2d
await not needed
jbouwh Feb 17, 2022
8fa8222
Improve casting types and naming
jbouwh Feb 17, 2022
b6e5e01
Merge branch 'dev' into mqtt-notify
jbouwh Feb 20, 2022
185e672
cleanup_device_registry signature change and black
jbouwh Feb 20, 2022
ed3b59f
remove not needed condition
jbouwh Mar 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove not needed condition
jbouwh committed Mar 8, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit ed3b59f9b85cc7284a6c5d44702675af4214db7a
5 changes: 2 additions & 3 deletions homeassistant/components/mqtt/mixins.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
from collections.abc import Callable
import json
import logging
from typing import Any, Protocol
from typing import Any, Protocol, cast

import voluptuous as vol

@@ -508,7 +508,6 @@ async def cleanup_device_registry(
entity_registry = er.async_get(hass)
if (
device_id
and config_entry_id
and not er.async_entries_for_device(
entity_registry, device_id, include_disabled_entities=False
)
@@ -517,7 +516,7 @@ async def cleanup_device_registry(
and not notify.device_has_notify_services(hass, device_id)
):
device_registry.async_update_device(
device_id, remove_config_entry_id=config_entry_id
device_id, remove_config_entry_id=cast(str, config_entry_id)
)