Skip to content

Commit

Permalink
fix issue with changing SwitchDevice to SwitchEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
snicker committed Aug 2, 2020
1 parent 4d748ac commit 92f5d50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/noonlight/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
from noonlight import NoonlightClient

from homeassistant.components import persistent_notification
from homeassistant.components.switch import SwitchDevice
try:
from homeassistant.components.switch import SwitchDevice
except ImportError:
from homeassistant.components.switch import SwitchEntity as SwitchDevice
from homeassistant.helpers.event import async_track_time_interval

from . import (DOMAIN, EVENT_NOONLIGHT_TOKEN_REFRESHED,
Expand Down

0 comments on commit 92f5d50

Please sign in to comment.