Lightwave Generation 2 component

Hi, I’m fairly new to the HA world so excuse some ignorance (it’s a steep learning curve!)

I’m trying to understand how I can use multiple presses for my gen2 switches. Am I missing something obvious or is this now not possible?
thanks!

1 Like

What have you tried?

Can you go into your HA web interface
→ developer tools
→ events
→ enter “lightwave2.click” into the “event to subscribe to”
→ click “start listening”
Then push some buttons on your physical device and see what happens?

Thanks for the reply! After some playing around I’ve got this solved :+1:

HI there, i have used the HAC to add lightwave 2 but it only finds 43 devices so only gets up to T in the device names. Is this a maximum or how do i get it to find the rest???

There’s no maximum, I’m pretty sure others are using >200. Can you turn on additional logging in the integration options and send me a copy of the logs please?

Its ok iwas being stupid as the stuff i was looking for was named incorrectly hence i couldnt find it. Thank you

Firstly, great integration bigbadblunt, thank you!

I’ve been having some problems with the lightwave2.click events though.
I can listen to/for them using dev tools and am able to see them fine, however when I then subsequently try to add them as a trigger for an automation they fail to trigger the automation.

The full automation (simply to turn on a lamp when I turn the light on) is:

alias: "Lights: Sitting Room Lamps - ON"
description: ""
trigger:
  - platform: event
    event_type: lightwave2.click
    event_data:
      data:
        entity_id: light.sitting_room_lights
        code: 257
condition: []
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.on_off_plug_in_unit_9
mode: single

I’ve tried various forms of copying the ‘trigger’ from the lightwave2.click events including;

Full data:

event_type: lightwave2.click
data:
  entity_id: light.sitting_room_lights
  code: 257
origin: LOCAL
time_fired: "2023-01-04T00:13:06.756038+00:00"
context:
  id: 01GNX1ZQA4R5DNKZD16NVFCY3T
  parent_id: null
  user_id: null

Removed time_fired and context:

data:
  entity_id: light.sitting_room_lights
  code: 257
origin: LOCAL

Just removing time_fired:

data:
  entity_id: light.sitting_room_lights
  code: 257
origin: LOCAL
context:
  id: 01GNX1ZQA4R5DNKZD16NVFCY3T
  parent_id: null
  user_id: null

and the above version in the automation - none seem to work. I know the issue isn’t the action (switch on/off) as that works fine just running that part of the automation.

Does anyone have any suggestions/clues they might be able to offer why automations aren’t tracking lightwave2.click events properly or how I should be formating the event for it to work properly?

N.B. I’m aware I could work around the problem by establishing an automation to turn the lamp on when the lights turn on by tracking the light entity on/off itself. That’s not a viable solution unfortunately for my use case.

Hithere, loving the integation other than the drop outs. thank you for the hard work.
Can some one tell me how to write an automation that will reconnect lightwave if no update is recieved on the link for 5 mins please.

See this comment

I think it’s now working thank you

Hi bigbadblunt, do you know what the 6 colours are for the LEDs in RGB or something HA already understands?

I used Green / 0 / 255 / 0 and for switches already on, it changes the other LEDs on 2g/3g/4g units even though the automation is only meant to change the single LED that’s on.

I did read in the app that Lightwave limits changing the “on” colour…so not sure if this is a by product of that restriction.

I struggled with this as a zero experience user. There’s an extra ‘data:’ line and indent that’s not required from the event formatting you receive when listening from the Developer Tools event tab.

If you use the visual editor to create an automation trigger, choose ‘event’ as trigger, add ‘lightwave2.click’ as the event type and then only include the following code in the event data window (for example):

entity_id: light.michaels_study
code: 258

Full trigger code looks like this:


trigger:
  - platform: event
    event_type: lightwave2.click
    event_data:
      entity_id: light.michaels_study
      code: 258

Disproportionate satisfaction when I got it going!

The colours are

Yellow FFFF00
Cyan 00FFFF
Magenta FF00FF
Red FF0000
White FFFFFF
Green 00FF00

I don’t have any devices that have more than one LED to try and work out what’s going on. If you turn on full logging and try to change the colour of one of the LEDs then send me the logs I can try to help.

Can you set the LED colours indivdually in the app?

Hi there bigbadblunt,

Just managed to install HACS and this lightwave2 integration and have my first double click event up and working. Just would like to say a big thank you for all the time and effort you have spent getting this up and running. Much appreciated.

Continuing the discussion from Lightwave Generation 2 component:

Hi, installed and working well. However, I changed the device name using the Lightwave App but it does not update the device name in HA, any thoughts? Mike

How do you use the code? Mike

Has anyone figured out a way to use the multi-press feature in automations within HA?

1 Like

I’ve figured out how to get triple press working but double press seem to only turn the actual lights on as it would with the single press. Am I doing something wrong?

Triple press that works:

alias: Manually Turn Main Bedroom Lamps On Automation
  description: ''
  trigger:
  - platform: event
    event_type: lightwave2.click
    event_data:
      entity_id: light.main_bedroom_light
      code: 259
    context: {}
  condition: []
  action:
  - parallel:
    - type: turn_on
      device_id: eba3c18a8624533b3c2262281a77fe4b
      entity_id: 849bb8eace20366ef2fdb8040c8361aa
      domain: switch
    - type: turn_on
      device_id: f0c8fdf0b15279725b311a230314fec7
      entity_id: 6672b896a41269e5eea3e7ddbf3b6fa4
      domain: switch

When I switch 259 to 258 the automation doesn’t work.

Double press is setup out of the box on the Lightwave switches to turn the lights on to full brightness. I think you can only override this if you have the Lightwave subscription which allows you to decouple the physical switches from controlling the lights.

1 Like

Thank you for the clarification.