Skip to content

Commit

Permalink
fix(action): preserve domain and service while addressing deprecated …
Browse files Browse the repository at this point in the history
…notice

Fixes #1622
  • Loading branch information
zachowj committed Oct 2, 2024
1 parent 11952df commit 613e505
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/nodes/action/ActionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class ActionController extends InputOutputController<
states,
);

let action: string = parsedMessage.action.value;
let action: string = parsedMessage.action.value.toLowerCase();
// TODO: Remove in version 1.0
if (parsedMessage.action.source === DataSource.Transformed) {
if (!this.#hasDeprecatedWarned) {
Expand Down Expand Up @@ -79,10 +79,6 @@ export default class ActionController extends InputOutputController<
typeof target.entity_id === 'string'
) {
const services = this.homeAssistant.websocket.getServices();
const [domain, service] = parsedMessage.action?.value
.toLowerCase()
.split('.');

if (
services[domain]?.[service]?.fields?.entity_id !== undefined &&
!mergedData.entity_id
Expand Down

0 comments on commit 613e505

Please sign in to comment.