Skip to content

Commit

Permalink
set entity to poll
Browse files Browse the repository at this point in the history
added init debug logging
  • Loading branch information
litinoveweedle committed Jun 3, 2024
1 parent 5d00254 commit 46e3eb1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions custom_components/smartir/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def load_file(device_code, device_class, required_keys):
if os.path.isdir(device_files_absdir):
device_json_path = os.path.join(device_files_absdir, device_json_filename)
if os.path.exists(device_json_path):
_LOGGER.debug(
"Loading custom device Json file '%s'.", device_json_filename
)
if device_data := DeviceData.check_file(
device_json_filename, device_json_path, required_keys
):
Expand All @@ -34,6 +37,9 @@ def load_file(device_code, device_class, required_keys):
if os.path.isdir(device_files_absdir):
device_json_path = os.path.join(device_files_absdir, device_json_filename)
if os.path.exists(device_json_path):
_LOGGER.debug(
"Loading device Json file '%s'.", device_json_filename
)
if device_data := DeviceData.check_file(
device_json_filename, device_json_path, required_keys
):
Expand Down
1 change: 1 addition & 0 deletions custom_components/smartir/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ async def async_setup_platform(


class SmartIRClimate(ClimateEntity, RestoreEntity):
_attr_should_poll = False
_enable_turn_on_off_backwards_compatibility = False

def __init__(self, hass, config, device_data):
Expand Down
2 changes: 2 additions & 0 deletions custom_components/smartir/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ async def async_setup_platform(


class SmartIRFan(FanEntity, RestoreEntity):
_attr_should_poll = False

def __init__(self, hass, config, device_data):
self.hass = hass
self._unique_id = config.get(CONF_UNIQUE_ID)
Expand Down
2 changes: 2 additions & 0 deletions custom_components/smartir/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ async def async_setup_platform(


class SmartIRMediaPlayer(MediaPlayerEntity, RestoreEntity):
_attr_should_poll = False

def __init__(self, hass, config, device_data):
self.hass = hass
self._unique_id = config.get(CONF_UNIQUE_ID)
Expand Down

0 comments on commit 46e3eb1

Please sign in to comment.