Add a dashboard condition based on user's location (#26401)

* Add a dashboard condition based on user's location

* Update src/translations/en.json

Co-authored-by: Norbert Rittel <norbert@rittel.de>

* Update src/data/person.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>

* Use multiple: true

---------

Co-authored-by: Norbert Rittel <norbert@rittel.de>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
karwosts
2025-08-11 21:51:31 -07:00
committed by GitHub
parent fe762e9ae4
commit 055e65c45e
7 changed files with 173 additions and 4 deletions

View File

@@ -63,10 +63,10 @@ class HaEntityStatePicker extends LitElement {
const entityIds = this.entityId ? ensureArray(this.entityId) : [];
const entitiesOptions = entityIds.map<StateOption[]>((entityId) => {
const stateObj = this.hass.states[entityId];
if (!stateObj) {
return [];
}
const stateObj = this.hass.states[entityId] || {
entity_id: entityId,
attributes: {},
};
const states = getStates(this.hass, stateObj, this.attribute).filter(
(s) => !this.hideStates?.includes(s)