Skip to content

Commit

Permalink
Merge pull request #193 from josh-shaw-dev/bug/circ-import-fix
Browse files Browse the repository at this point in the history
Fix circ reference, import from pychonet #192
  • Loading branch information
nao-pon authored Sep 15, 2024
2 parents 8fb3820 + c43479c commit 68bbfa6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 2 additions & 3 deletions custom_components/echonetlite/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@
from pychonet.EchonetInstance import ENL_STATUS, ENL_ON, ENL_OFF
from pychonet.lib.const import ENL_CUMULATIVE_POWER, ENL_INSTANTANEOUS_POWER
from pychonet.lib.epc_functions import DATA_STATE_CLOSE, DATA_STATE_OPEN

from custom_components.echonetlite.fan import (
from pychonet.CeilingFan import (
ENL_FANSPEED_PERCENT,
ENL_FAN_DIRECTION,
ENL_FAN_OSCILLATION,
ENL_FANSPEED_PERCENT,
)

DOMAIN = "echonetlite"
Expand Down
15 changes: 9 additions & 6 deletions custom_components/echonetlite/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
PRECISION_WHOLE,
)
from . import get_device_name
from .const import CONF_FORCE_POLLING, DATA_STATE_ON, DOMAIN
from .const import (
CONF_FORCE_POLLING,
DATA_STATE_ON,
DOMAIN,
ENL_FANSPEED,
ENL_FANSPEED_PERCENT,
ENL_FAN_DIRECTION,
ENL_FAN_OSCILLATION,
)

_LOGGER = logging.getLogger(__name__)

ENL_FANSPEED = 0xA0
ENL_FANSPEED_PERCENT = 0xF0
ENL_FAN_DIRECTION = 0xF1
ENL_FAN_OSCILLATION = 0xF2

DEFAULT_FAN_MODES = list(
FAN_SPEED.keys()
) # ["auto","minimum","low","medium-low","medium","medium-high","high","very-high","max"]
Expand Down

0 comments on commit 68bbfa6

Please sign in to comment.