Skip to content

Commit

Permalink
fix: areas incorrectly resolved (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugobloem authored Oct 18, 2024
2 parents 3a8a6d2 + 76ff77b commit 85323e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/stateful_scenes/StatefulScenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import yaml
import os
from homeassistant.core import HomeAssistant, Event, EventStateChangedData
from homeassistant.helpers.template import area_id
from homeassistant.helpers.template import area_id, area_name
from .helpers import (
get_name_from_entity_id,
get_icon_from_entity_id,
Expand Down Expand Up @@ -178,7 +178,7 @@ def extract_scene_configuration(self, scene_conf: dict) -> dict:
"icon", get_icon_from_entity_id(self.hass, entity_id)
),
"entity_id": entity_id,
"area": area_id(self.hass, entity_id),
"area": area_name(self.hass, area_id(self.hass, entity_id)),
"learn": scene_conf.get("learn", False),
"entities": entities,
"number_tolerance": scene_conf.get(
Expand All @@ -193,7 +193,7 @@ def prepare_external_scene(self, entity_id, entities) -> dict:
"id": get_id_from_entity_id(self.hass, entity_id),
"icon": get_icon_from_entity_id(self.hass, entity_id),
"entity_id": entity_id,
"area": area_id(self.hass, entity_id),
"area": area_name(self.hass, area_id(self.hass, entity_id)),
"learn": True,
"entities": entities,
}
Expand Down

0 comments on commit 85323e1

Please sign in to comment.