Skip to content

Commit

Permalink
Move notification services to main list (#19235)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Jan 2, 2024
1 parent 2933d64 commit e721481
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/panels/config/automation/add-automation-element-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ const ENTITY_DOMAINS_OTHER = new Set([
"image_processing",
]);

const ENTITY_DOMAINS_MAIN = new Set(["notify"]);

@customElement("add-automation-element-dialog")
class DialogAddAutomationElement extends LitElement implements HassDialog {
@property({ attribute: false }) public hass!: HomeAssistant;
Expand Down Expand Up @@ -302,11 +304,13 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
const domainUsed = !domains ? true : domains.has(domain);
if (
(type === undefined &&
manifest?.integration_type === "entity" &&
domainUsed &&
!ENTITY_DOMAINS_OTHER.has(domain)) ||
(ENTITY_DOMAINS_MAIN.has(domain) ||
(manifest?.integration_type === "entity" &&
domainUsed &&
!ENTITY_DOMAINS_OTHER.has(domain)))) ||
(type === "helper" && manifest?.integration_type === "helper") ||
(type === "other" &&
!ENTITY_DOMAINS_MAIN.has(domain) &&
(ENTITY_DOMAINS_OTHER.has(domain) ||
(!domainUsed && manifest?.integration_type === "entity") ||
!["helper", "entity"].includes(manifest?.integration_type || "")))
Expand Down

0 comments on commit e721481

Please sign in to comment.