Skip to content

Commit

Permalink
entity category
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Nov 26, 2023
1 parent bb5b427 commit 0716076
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions src/components/knx-configure-switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,29 +105,6 @@ export class KNXConfigureSwitch extends LitElement {
.value=${this.config.sync_state ?? true}
@value-changed=${this._updateConfig}
></knx-sync-state-selector-row>
<!-- <ha-settings-row narrow>
<div slot="heading">Entity settings</div>
<div slot="description">Description</div>
<ha-selector
.hass=${this.hass}
.label=${"Entity category"}
.selector=${{
select: {
multiple: false,
custom_value: false,
mode: "dropdown",
options: [
{ value: null, label: "None" }, // null not valid for selector - doesn't fire event
{ value: "config", label: "Config" },
{ value: "diagnostic", label: "Diagnostic" },
],
},
}}
.key=${"entity_category"}
.value=${this.config.entity_category ?? null}
@value-changed=${this._updateConfig}
></ha-selector>
</ha-settings-row> -->
</ha-expansion-panel>
</ha-card>
<ha-card outlined>
Expand All @@ -150,6 +127,32 @@ export class KNXConfigureSwitch extends LitElement {
@value-changed=${this._updateConfig}
></ha-selector>
</ha-settings-row>
<ha-expansion-panel .header=${"Advanced"} outlined>
<ha-settings-row narrow>
<div slot="heading">Entity settings</div>
<div slot="description">Description</div>
<ha-selector
.hass=${this.hass}
.label=${"Entity category"}
.helper=${"Leave empty for standard behaviour."}
.required=${false}
.selector=${{
select: {
multiple: false,
custom_value: false,
mode: "dropdown",
options: [
{ value: "config", label: "Config" },
{ value: "diagnostic", label: "Diagnostic" },
],
},
}}
.key=${"entity_category"}
.value=${this.config.entity_category}
@value-changed=${this._updateConfig}
></ha-selector>
</ha-settings-row>
</ha-expansion-panel>
</ha-card>
`;
}
Expand Down

0 comments on commit 0716076

Please sign in to comment.