Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: areas incorrectly resolved #119

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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