Skip to content

Commit

Permalink
Add the minimum required EPC_FUNCTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Sep 3, 2024
1 parent 45c5791 commit 43d94ea
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
22 changes: 21 additions & 1 deletion pychonet/GeneralLighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def _0290B1(edt):

class GeneralLighting(EchonetInstance):
EPC_FUNCTIONS = {
0xB1: [
0xB0: _int, # Illuminance level
0xB1: [ # Light color setting
_int,
{
0x40: "other",
Expand All @@ -61,6 +62,25 @@ class GeneralLighting(EchonetInstance):
0x44: "daylight_color",
},
],
# 0xB2: "Illuminance level step setting",
# 0xB3: "Light color step setting",
# 0xB4: "Maximum specifiable values",
# 0xB5: "Maximum value of settable level for night lighting",
# 0xB6: "Lighting mode setting",
# 0xB7: "Illuminance level setting for main lighting",
# 0xB8: "Illuminance level step setting for main lighting",
# 0xB9: "Illuminance level setting for night lighting",
# 0xBA: "Illuminance level step setting for night lighting",
# 0xBB: "Light color setting for main lighting",
# 0xBC: "Light color level step setting for main lighting",
# 0xBD: "Light color setting for night lighting",
# 0xBE: "Light color level step setting for night lighting",
# 0xBF: "Lighting mode status in auto mode",
# 0xC0: "RGB setting for color lighting",
# 0x90: "ON timer reservation setting",
# 0x91: "ON timer setting",
# 0x94: "OFF timer reservation setting",
# 0x95: "OFF timer setting",
}

def __init__(self, host, api_connector=None, instance=0x1):
Expand Down
7 changes: 6 additions & 1 deletion pychonet/SingleFunctionLighting.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
from pychonet.EchonetInstance import EchonetInstance
from pychonet.GeneralLighting import ENL_BRIGHTNESS
from pychonet.lib.epc_functions import _int

# ----- Single function lighting class -------


# TODO - implemenet FUNCTIONS
# 0xB0: 'Illuminance level setting',
# 0xB0: 'Illuminance level setting',


"""Class for Single Function Lighting Objects"""


class SingleFunctionLighting(EchonetInstance):
EPC_FUNCTIONS = {
0xB0: _int, # Illuminance level setting
}

def __init__(self, host, api_connector=None, instance=0x1):
self._eojgc = 0x02 # Housing/facility-related device group
self._eojcc = 0x91 # Single Function Lighting class
Expand Down

0 comments on commit 43d94ea

Please sign in to comment.