Skip to content

Commit

Permalink
Respect climate system_mode ACCESS_SET bit in Home Assistant (#14715)
Browse files Browse the repository at this point in the history
  • Loading branch information
xworld21 committed Oct 30, 2022
1 parent fd02326 commit 58c8001
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/extension/homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ export default class HomeAssistant extends Extension {
discoveryEntry.discovery_payload.mode_state_topic = true;
discoveryEntry.discovery_payload.mode_state_template = `{{ value_json.${mode.property} }}`;
discoveryEntry.discovery_payload.modes = mode.values;
discoveryEntry.discovery_payload.mode_command_topic = true;
if (mode.access & ACCESS_SET) {
discoveryEntry.discovery_payload.mode_command_topic = true;
}
}

const state = firstExpose.features.find((f) => f.name === 'running_state');
Expand Down

0 comments on commit 58c8001

Please sign in to comment.