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] Control Multiple lights with one remote individually. #304

Closed
10bn opened this issue May 21, 2021 · 8 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@10bn
Copy link

10bn commented May 21, 2021

Hi, at first thank you very much for this awesome tool!

I would like to suggest the idea to control different lights with the same remote by cycling through a set of predefined light ids using the left and right buttons eg. on the ikea E1810 remote.

@10bn 10bn added the enhancement New feature or request label May 21, 2021
@xaviml
Copy link
Owner

xaviml commented May 21, 2021

Hi @jaddel,

I have considered this in the past, and I made the decision to not add such functionality natively since it can be achieved through configuration.

You will first need to setup the following input select through UI or YAML:

input_select:
  lights:
    options:
      - light.my_light_1
      - light.my_light_2
      - light.my_light_3

Then, you would need the following ControllerX configuration:

example_app:
  module: controllerx
  class: E1810Controller
  controller: sensor.controller_action
  light: "{{ states('input_select.lights') }}"
  # This is recommendable if the lights you want to loop through have different supported actions
  update_supported_features: true
  merge_mapping:
    arrow_left_click:
      - service: input_select.select_previous
        data:
          entity_id: input_select.lights
    arrow_right_click:
      - service: input_select.select_next
        data:
          entity_id: input_select.lights

This is an example with the E1810 as you stated. I have tried this and it worked on my side. However, there is a bug that needs to be fixed for this configuration to fully work. I created a ticket for this ( #305 ), and I will be submitting the fix soon. You can try this configuration in the meantime and play around, but you might encounter the same issue as described in #305.

I will leave this ticket closed, but I am happy to continue the conversation here.

Regards,
Xavi M.

@xaviml
Copy link
Owner

xaviml commented May 21, 2021

Hi @jaddel,

Issue #305 has been fixed and it has been deployed. Fixed will be found in ControllerX v4.11.1.

Regards,
Xavi M.

@10bn
Copy link
Author

10bn commented May 21, 2021

This is super! Thank you very much for laying out the details! I'll try it asap.

@10bn
Copy link
Author

10bn commented May 23, 2021

Hi again, since I set it up ass you recommended i lost the ability to adjust the brightness. Am I missing something?

Here is one of my configurations:

bedroom_lights:
  module: controllerx
  class: E1810Controller
  controller: bc:33:ac:ff:fe:95:4f:8f
  integration: zha
  light: "{{ states('input_select.bedroom_lights') }}"
  # This is recommendable if the lights you want to loop through have different supported actions
  update_supported_features: true
  merge_mapping:
    press_257_13_0:
      - service: input_select.select_previous
        data:
          entity_id: input_select.bedroom_lights
    press_256_13_0:
      - service: input_select.select_next
        data:
          entity_id: input_select.bedroom_lights

@xaviml
Copy link
Owner

xaviml commented May 23, 2021

Hi @jaddel,

Could you please share the AppDaemon logs?

Also, did you upgrade ControllerX to v4.11.1, and restart the AppDaemon server?

Regards,
Xavi M.

EDIT: Upgrade to v4.11.2

@10bn
Copy link
Author

10bn commented May 24, 2021

Thank you, now its working!

@thijselblaso
Copy link

Is it possible to flash(short) the light that you select each time you switch? This way it's easier to recognize which light you have selected.

@10bn
Copy link
Author

10bn commented Nov 26, 2021

Is it possible to flash(short) the light that you select each time you switch? This way it's easier to recognize which light you have selected.

Try this automation:

alias: Flash selected light.
description: ''
trigger:
  - platform: state
    entity_id: input_select.office_lights
    id: input_select
condition: []
action:
  - choose:
      - conditions:
          - condition: template
            value_template: '{{ is_state(states(''input_select.office_lights''), ''on'') }}'
        sequence:
          - service: light.turn_off
            target:
              entity_id: '{{ states(''input_select.office_lights'') }}'
          - delay:
              hours: 0
              minutes: 0
              seconds: 1
              milliseconds: 0
          - service: light.turn_on
            target:
              entity_id: '{{ states(''input_select.office_lights'') }}'
      - conditions:
          - condition: template
            value_template: '{{ is_state(states(''input_select.office_lights''), ''off'') }}'
        sequence:
          - service: light.turn_on
            target:
              entity_id: '{{ states(''input_select.office_lights'') }}'
          - delay:
              hours: 0
              minutes: 0
              seconds: 1
              milliseconds: 0
          - service: light.turn_off
            target:
              entity_id: '{{ states(''input_select.office_lights'') }}'
    default: []
mode: single

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