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

[QUESTION] How to increase brightness when light is initially off? #1112

Open
bakeromso opened this issue Jan 7, 2025 · 0 comments
Open
Assignees
Labels
question Further information is requested

Comments

@bakeromso
Copy link

Question

I have an ikea remote (E2201) and I things are working except for one modification I'm trying to make. When the light is off, and I hold the up button (sending brightness increase) I would like the light to be set to brightness 1 and increase from there. I've tried it by making a merge_mapping calling a script, in which I do the logic stuff (if the light is off, set brightness to 1, turn on and proceed, else do nothing). After the script, I manually call the action hold_brightness_up. I had hoped this would set the brightness to 1 and by holding the button, gradually increase. However, the only effect is that the light is turned on, but holding has no effect. Only after I release and hold again, the brightness increases.

Additional information

  • Devices involved:
    • Model: IKEA E2201 button
  • Integration: z2m
  • AppDaemon version: v4.4.2
  • ControllerX version: v2.28.0
  • HACS version: v2.0.2
  • Home Assistant Core version: v2025.1.0

AppDaemon app configuration

remote_bedroom:
  module: controllerx
  class: E1743Controller
  integration:
     name: z2m
     listen_to: mqtt
  controller: Remote bedroom
  light: light.dimmer_bed_room_light
  min_brightness: 1
  merge_mapping:
    brightness_move_up:
      - service: script.brightness_hold_on
        data:
          light_entity: light.dimmer_bed_room_light
      - action: hold_brightness_up

script

brightness_hold_on:
  fields:
    light_entity:
      selector:
        entity: {}
      name: light_entity
      description: The light entity to control
      required: true
      default: light.bedroom_main_synth
  alias: Brightness hold on
  description: ''
  sequence:
  - condition: template
    value_template: '{{ is_state(light_entity, ''off'') }}'
  - action: light.turn_on
    data:
      entity_id: '{{ light_entity }}'
      brightness: 10
  - delay: 00:00:01

Logs

2025-01-07 16:08:52.202128 INFO remote_bedroom: 🎮 Button event triggered: `off`
2025-01-07 16:08:52.222073 INFO remote_bedroom: 🏃 Running `Predefined (off)` now
2025-01-07 16:08:52.233064 INFO remote_bedroom: 
🤖 Service: light.turn_off
  - entity_id: light.dimmer_bed_room_light
2025-01-07 16:08:57.381747 INFO remote_bedroom: 🎮 Button event triggered: `brightness_move_up`
2025-01-07 16:08:57.401920 INFO remote_bedroom: 🏃 Running `Service (script.brightness_hold_on)` now
2025-01-07 16:08:57.408416 INFO remote_bedroom: 
🤖 Service: script.brightness_hold_on
  - light_entity: light.dimmer_bed_room_light
2025-01-07 16:08:57.417693 INFO remote_bedroom: 🏃 Running `Predefined (hold_brightness_up)` now
2025-01-07 16:09:02.542176 INFO remote_bedroom: 🎮 Button event triggered: `brightness_stop`
2025-01-07 16:09:02.548268 INFO remote_bedroom: 🏃 Running `Predefined (release)` now
2025-01-07 16:09:05.093945 INFO remote_bedroom: 🎮 Button event triggered: `brightness_move_up`
2025-01-07 16:09:05.113453 INFO remote_bedroom: 🏃 Running `Service (script.brightness_hold_on)` now
2025-01-07 16:09:05.120525 INFO remote_bedroom: 
🤖 Service: script.brightness_hold_on
  - light_entity: light.dimmer_bed_room_light
2025-01-07 16:09:05.130055 INFO remote_bedroom: 🏃 Running `Predefined (hold_brightness_up)` now
2025-01-07 16:09:05.163966 INFO remote_bedroom: 
🤖 Service: light.turn_on
  - entity_id: light.dimmer_bed_room_light
  - transition: 0.35
  - brightness: 26
2025-01-07 16:09:05.519850 INFO remote_bedroom: 
🤖 Service: light.turn_on
  - entity_id: light.dimmer_bed_room_light
  - transition: 0.35
  - brightness: 51
2025-01-07 16:09:05.882454 INFO remote_bedroom: 
🤖 Service: light.turn_on
  - entity_id: light.dimmer_bed_room_light
  - transition: 0.35
  - brightness: 76
2025-01-07 16:09:06.247380 INFO remote_bedroom: 
🤖 Service: light.turn_on
  - entity_id: light.dimmer_bed_room_light
  - transition: 0.35
  - brightness: 101
2025-01-07 16:09:06.538159 INFO remote_bedroom: 🏃 Running `Predefined (release)` now

Additional Context

Note that I'm purposely using E1743 class, due to the absence of E2201 class.

@bakeromso bakeromso added the question Further information is requested label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants