Skip to content

Commit

Permalink
fix auto detection of c2, c2 rgb, wrgb2
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMicDiet committed Aug 31, 2024
1 parent 09edb7f commit 488c85f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
4 changes: 0 additions & 4 deletions custom_components/chihiros/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
ble_device,
)

# TODO - DONE 1. Create API instance
# TODO 2. Validate the API connection (and authentication)
# TODO - DONE 3. Store an API object for your platforms to access
# hass.data[DOMAIN][entry.entry_id] = MyApi(...)
hass.data.setdefault(DOMAIN, {})
hass.data[DOMAIN][entry.entry_id] = ChihirosData(
entry.title, chihiros_device, coordinator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CII(BaseDevice):
"""Chihiros CII device Class."""

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

_model_name = "CII RGB"
_model_code = ["DYNCRGP"]
_model_codes = ["DYNCRGP"]
_colors: dict[str, int] = {
"red": 0,
"green": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class WRGBII(BaseDevice):
"""Chihiros WRGB II device Class."""

_model_name = "WRGB II"
_model_code = ["DYNWRGB", "DYNW30", "DYNW45", "DYNW60", "DYNW90", "DYNW12P"]
_model_codes = ["DYNWRGB", "DYNW30", "DYNW45", "DYNW60", "DYNW90", "DYNW12P"]
_colors: dict[str, int] = {
"white": 0,
"red": 1,
Expand Down
3 changes: 3 additions & 0 deletions custom_components/chihiros/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ async def async_step_bluetooth(
device = model_class(discovery_info.device)
self._discovery_info = discovery_info
self._discovered_device = device
_LOGGER.debug(
"async_step_bluetooth - discovered device %s", discovery_info.name
)
return await self.async_step_bluetooth_confirm()

async def async_step_bluetooth_confirm(
Expand Down
1 change: 0 additions & 1 deletion custom_components/chihiros/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from .coordinator import ChihirosDataUpdateCoordinator
from .models import ChihirosData

# from led_ble import LEDBLE
_LOGGER = logging.getLogger(__name__)


Expand Down
2 changes: 1 addition & 1 deletion custom_components/chihiros/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@
"requirements": [
"typer[all]==0.9.0"
],
"version": "0.5.0"
"version": "0.5.1"
}

0 comments on commit 488c85f

Please sign in to comment.