Skip to content

Commit

Permalink
add support for c2 non rgb and white backlight
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMicDiet committed Aug 31, 2024
1 parent 4912865 commit 09edb7f
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

from ..exception import DeviceNotFound
from .a2 import AII
from .backlight import Backlight
from .base_device import BaseDevice
from .c2 import CII
from .c2rgb import CIIRGB
from .fallback import Fallback
from .tiny_terrarium_egg import TinyTerrariumEgg
Expand Down Expand Up @@ -44,8 +46,10 @@ async def get_device_from_address(device_address: str) -> BaseDevice:
__all__ = [
"TinyTerrariumEgg",
"AII",
"Backlight",
"WRGBII",
"WRGBIIPro",
"CII",
"CIIRGB",
"UniversalWRGB",
"FallBack",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Backlight device Model."""

from .base_device import BaseDevice


class Backlight(BaseDevice):
"""Chihiros LED Backlight device Class."""

_model_name = "Backlight"
_model_codes = ["DYCOM"]
_colors: dict[str, int] = {
"white": 0,
}
13 changes: 13 additions & 0 deletions custom_components/chihiros/chihiros_led_control/device/c2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""CII device Model."""

from .base_device import BaseDevice


class CII(BaseDevice):
"""Chihiros CII device Class."""

_model_name = "CII"
_model_code = ["DYNC2N"]
_colors: dict[str, int] = {
"white": 0,
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class CIIRGB(BaseDevice):
"""Chihiros WRGB II device Class."""
"""Chihiros CII RGB device Class."""

_model_name = "CII RGB"
_model_code = ["DYNCRGP"]
Expand Down
10 changes: 9 additions & 1 deletion custom_components/chihiros/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@
"local_name": "DYU*",
"connectable": true
},
{
"local_name": "DYNC2N*",
"connectable": true
},
{
"local_name": "DYCOM*",
"connectable": true
},
{
"service_data_uuid": "6e400001-b5a3-f393-e0a9-e50e24dcca9e",
"connectable": true
Expand All @@ -62,5 +70,5 @@
"requirements": [
"typer[all]==0.9.0"
],
"version": "0.4.1"
"version": "0.5.0"
}

0 comments on commit 09edb7f

Please sign in to comment.