Skip to content

Commit

Permalink
add support for wrgb 2 slim
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMicDiet committed Aug 31, 2024
1 parent 6cfe824 commit 20551b1
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This repository contains a python **CLI** script as well as a **Home Assistant i

## Supported Devices
- [Chihiros LED A2](https://www.chihirosaquaticstudio.com/products/chihiros-a-ii-built-in-bluetooth)
- [Chihiros WRGB II](https://www.chihirosaquaticstudio.com/products/chihiros-wrgb-ii-led-built-in-bluetooth) (Pro)
- [Chihiros WRGB II](https://www.chihirosaquaticstudio.com/products/chihiros-wrgb-ii-led-built-in-bluetooth) (Regular, Pro, Slim)
- Chihiros Tiny Terrarium Egg
- Chihiros C II (RGB/White)
- Chihiros C II (RGB, White)
- Chihiros Universal WRGB
- other LED models might work as well but are not tested

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .universal_wrgb import UniversalWRGB
from .wrgb2 import WRGBII
from .wrgb2_pro import WRGBIIPro
from .wrgb2_slim import WRGBIISlim

CODE2MODEL = {}
for name, obj in inspect.getmembers(sys.modules[__name__]):
Expand Down Expand Up @@ -49,6 +50,7 @@ async def get_device_from_address(device_address: str) -> BaseDevice:
"Backlight",
"WRGBII",
"WRGBIIPro",
"WRGBIISlim",
"CII",
"CIIRGB",
"UniversalWRGB",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class CII(BaseDevice):
"""Chihiros CII device Class."""

_model_name = "CII"
_model_name = "C II"
_model_codes = ["DYNC2N"]
_colors: dict[str, int] = {
"white": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class CIIRGB(BaseDevice):
"""Chihiros CII RGB device Class."""

_model_name = "CII RGB"
_model_name = "C II RGB"
_model_codes = ["DYNCRGP"]
_colors: dict[str, int] = {
"red": 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""WRGB II Slim device Model."""

from .base_device import BaseDevice


class WRGBIISlim(BaseDevice):
"""Chihiros WRGB II Slim device Class."""

_model_name = "WRGB II Slim"
_model_codes = ["DYSILN"]
_colors: dict[str, int] = {
"white": 0,
"red": 1,
"green": 2,
"blue": 3,
}
6 changes: 5 additions & 1 deletion custom_components/chihiros/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
"local_name": "DYCOM*",
"connectable": true
},
{
"local_name": "DYSILN*",
"connectable": true
},
{
"service_data_uuid": "6e400001-b5a3-f393-e0a9-e50e24dcca9e",
"connectable": true
Expand All @@ -70,5 +74,5 @@
"requirements": [
"typer[all]==0.9.0"
],
"version": "0.5.1"
"version": "0.6.0"
}

0 comments on commit 20551b1

Please sign in to comment.