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

Update FanEntityFeature.TURN_OFF / TURN_ON #104

Merged
merged 2 commits into from
Aug 13, 2024
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
7 changes: 6 additions & 1 deletion custom_components/smartir/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ async def async_setup_platform(

class SmartIRFan(FanEntity, RestoreEntity):
_attr_should_poll = False
_enable_turn_on_off_backwards_compatibility = False

def __init__(self, hass, config, device_data):
self.hass = hass
Expand All @@ -92,7 +93,11 @@ def __init__(self, hass, config, device_data):
self._speed = None
self._oscillating = None
self._on_by_remote = False
self._support_flags = FanEntityFeature.SET_SPEED
self._support_flags = (
FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF
)
self._power_sensor_check_expect = None
self._power_sensor_check_cancel = None

Expand Down
Loading