Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Add E2004ASwitchController #643

Open
simonckenyon opened this issue Dec 11, 2022 · 2 comments
Open

[FEATURE REQUEST] Add E2004ASwitchController #643

simonckenyon opened this issue Dec 11, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@simonckenyon
Copy link

Feature Request

Add E2004SwitchController so that the device can be used as a simple on/off switch

Describe the solution / feature you'd like

I added the following code to controllerx/cx_devices/ikea.py

class E2004SwitchController(SwitchController):
    def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
        return {"on": Switch.ON, "off": Switch.OFF}

    def get_deconz_actions_mapping(self) -> DefaultActionsMapping:
        return {1002: Switch.ON, 2002: Switch.OFF}

    def get_zha_actions_mapping(self) -> DefaultActionsMapping:
        return {"on": Switch.ON, "off": Switch.OFF}

Describe alternatives you've considered

I could not see another way to do this.

Additional context

I have a device to hand and I just wanted to be able to turn a group of chrsitmas lights on or off.

@simonckenyon simonckenyon added the enhancement New feature or request label Dec 11, 2022
@xaviml
Copy link
Owner

xaviml commented Dec 31, 2022

Hi @simonckenyon ,

Could you please share a link from Zigbee2MQTT for the support of this device (or any other link)? I only saw this device as E2004 on Google: https://www.ikea.com/us/en/manuals/vappeby-bluetooth-speaker-lamp-outdoor-blue__AA-2307027-1-2.pdf However, this device works with bluetooth, not Zigbee. Maybe did you mean E2002?

If you meant the E2002, you could temporarily do the following as an alternative solution:

example_app:
  module: controllerx
  class: SwitchController
  integration: z2m
  controller: sensor.my_controller_action
  switch: switch.my_entity_id
  mapping:
    "on": "on"
    "off": "off"

Regards,
Xavi M.

@inertia666
Copy link

Hi @simonckenyon ,

Could you please share a link from Zigbee2MQTT for the support of this device (or any other link)? I only saw this device as E2004 on Google: https://www.ikea.com/us/en/manuals/vappeby-bluetooth-speaker-lamp-outdoor-blue__AA-2307027-1-2.pdf However, this device works with bluetooth, not Zigbee. Maybe did you mean E2002?

If you meant the E2002, you could temporarily do the following as an alternative solution:

example_app:
  module: controllerx
  class: SwitchController
  integration: z2m
  controller: sensor.my_controller_action
  switch: switch.my_entity_id
  mapping:
    "on": "on"
    "off": "off"

Regards, Xavi M.

As a side note regarding the E2002 and the E1810 is there a physical reason the E2002 "on" and E1810 "toggle" buttons do not have hold actions? I would like to be able to hold these buttons, if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants