Skip to content

Commit

Permalink
[TASK] fix HA 2024.2 supports the turn_on/turn_off methods and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
KartoffelToby committed Feb 8, 2024
1 parent c650075 commit db150f7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions custom_components/better_thermostat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The better_thermostat component."""

import logging
from asyncio import Lock
from homeassistant.const import Platform
Expand Down
1 change: 1 addition & 0 deletions custom_components/better_thermostat/calibration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper functions for the Better Thermostat component."""

import logging
from typing import Union

Expand Down
16 changes: 14 additions & 2 deletions custom_components/better_thermostat/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,5 +1313,17 @@ def supported_features(self):
Supported features.
"""
if self.cooler_entity_id is not None:
return ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
return ClimateEntityFeature.TARGET_TEMPERATURE
return (
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
| ClimateEntityFeature.PRESET_MODE
| ClimateEntityFeature.PRESET_MODE
| ClimateEntityFeature.TURN_OFF
| ClimateEntityFeature.TURN_ON
)
return (
ClimateEntityFeature.TARGET_TEMPERATURE
| ClimateEntityFeature.PRESET_MODE
| ClimateEntityFeature.PRESET_MODE
| ClimateEntityFeature.TURN_OFF
| ClimateEntityFeature.TURN_ON
)
1 change: 1 addition & 0 deletions custom_components/better_thermostat/diagnostics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Diagnostics support for Brother."""

from __future__ import annotations

from homeassistant.config_entries import ConfigEntry
Expand Down
1 change: 1 addition & 0 deletions custom_components/better_thermostat/utils/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""""""

import os
import json
from enum import IntEnum
Expand Down
1 change: 1 addition & 0 deletions custom_components/better_thermostat/utils/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper functions for the Better Thermostat component."""

import re
import logging
from datetime import datetime
Expand Down

0 comments on commit db150f7

Please sign in to comment.