Skip to content

Commit f7aca93

Browse files
authored
Merge pull request #157 from c-st/fix-area-selection
Make area filtering less strict
2 parents 21bd9d4 + 35ddd13 commit f7aca93

File tree

5 files changed

+6
-28
lines changed

5 files changed

+6
-28
lines changed

.devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "c-st/auto_areas",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.12",
3+
"image": "mcr.microsoft.com/devcontainers/python:latest",
44
"postCreateCommand": "scripts/setup",
55
"forwardPorts": [
66
8123

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: "Set up Python"
1717
uses: actions/setup-python@v5.0.0
1818
with:
19-
python-version: "3.12"
19+
python-version: "3.13"
2020
cache: "pip"
2121

2222
- name: "Install requirements"

custom_components/auto_areas/config_flow.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
import homeassistant.helpers.selector as selector
1818
from homeassistant.config_entries import ConfigFlowResult
19-
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
20-
from homeassistant.components.sensor.const import SensorDeviceClass
2119
from homeassistant.data_entry_flow import FlowResult
2220

2321
from custom_components.auto_areas.calculations import (
@@ -93,26 +91,6 @@ async def async_step_init(
9391
CONFIG_AREA), # type: ignore
9492
): selector.AreaSelector(
9593
selector.AreaSelectorConfig(
96-
entity=[
97-
selector.EntityFilterSelectorConfig(
98-
device_class=SensorDeviceClass.TEMPERATURE
99-
),
100-
selector.EntityFilterSelectorConfig(
101-
device_class=SensorDeviceClass.HUMIDITY
102-
),
103-
selector.EntityFilterSelectorConfig(
104-
device_class=SensorDeviceClass.ILLUMINANCE
105-
),
106-
selector.EntityFilterSelectorConfig(
107-
device_class=BinarySensorDeviceClass.MOTION
108-
),
109-
selector.EntityFilterSelectorConfig(
110-
device_class=BinarySensorDeviceClass.OCCUPANCY
111-
),
112-
selector.EntityFilterSelectorConfig(
113-
device_class=BinarySensorDeviceClass.PRESENCE
114-
),
115-
],
11694
multiple=False,
11795
)
11896
),

mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
python = "latest"

requirements.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
colorlog>=6.8
2-
homeassistant==2024.7.4
3-
pip>=21.3.1,<24.1
4-
ruff==0.5.5
1+
homeassistant==2025.4.3
2+
ruff==0.11.6

0 commit comments

Comments
 (0)