mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 02:49:51 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user