lkempf/casambi-bt-hass

feature request: support multiple elements per unit

Opened this issue · 2 comments

My luminaires have two elements per unit that I want to control separately.

Unit(
  _typeId=22133, deviceId=1, uuid='x', address='x', name='CURVED ', 
  firmwareVersion='9472', 
  unitType=UnitType(
    id=22133, model='CURVED ', manufacturer='OLIGO', 
    mode='PWM/4ch/Dim,Dim,TW', stateLength=3, 
    controls=[
      UnitControl(type=<UnitControlType.DIMMER: 0>, offset=0, length=8, default=128, readonly=False), 
      UnitControl(type=<UnitControlType.DIMMER: 0>, offset=8, length=8, default=128, readonly=False), 
      UnitControl(type=<UnitControlType.UNKOWN: 99>, offset=16, length=8, default=46, readonly=False)]
    ),
    _state=None, _on=False, _online=True
  )

image

image

I've looked at how I implemented the control to state conversion in casambi-bt and there would be some large changes needed to implement this, particularly in UnitState and the conversion between state and bytes. I might do that should I eventually refactor UnitState but it's not something I could do short term.

Am I correct that currently both dimmers get set to the same value? Because if not I could try to look at why not. The only way to currently control both dimmers from HA would be using scenes to set them to predetermined values.

Am I correct that currently both dimmers get set to the same value?

yes, both are good n sync.