Closed PaulAntonDeen closed 6 months ago
You already can use it in automation using zha_event differentiating by cluster_id, command and args. For the device_actions to be supported, you would need to map those combinations of cluster_id, command and args into device action and adding it to quirk class
A brief description of how device triggers work is here: https://github.com/zigpy/zha-device-handlers/blob/dev/CONTRIBUTING.md#how-device_automation_triggers-work
Try to implement them using other quirks as a guide. Is this all you are stuck on?
@Adminiuga While it is great that I can make it work by hacking the automations together within HA, I think it would be much nicer if we can get this thing implemented well so that the whole community can benefit. So making the quirk should be better right?
@dmulcahey I have not had the time to try these solutions yet. I was following https://github.com/zigpy/zha-device-handlers/blob/dev/CONTRIBUTING.md so I know I have to write a replacement and some subroutines, but what to write in that section is beyond me.
I got what I need by using the zha_event, thanks for the tip. It is still worth pursuing the quirk I think.
@PaulAntonDeen
Hi Paul,
I started working on the blueprint:
blueprint:
name: icasa PULSE 8S keypad (ZHA)
description: 'Control anything using icasa Pulse 8S keypad'
domain: automation
input:
icasa_remote:
name: Keypad
description: Keypad to use
selector:
device:
integration: zha
manufacturer: icasa
model: ICZB-KPD18S
button_on:
name: On Button
description: Action to run on press on On button
default: []
selector:
action: {}
button_off:
name: Off Button
description: Action to run on press on Off button
default: []
selector:
action: {}
button_1:
name: Button S1
description: Action to run on Button S1
default: []
selector:
action: {}
button_2:
name: Button S2
description: Action to run on Button S2
default: []
selector:
action: {}
button_3:
name: Button S3
description: Action to run on Button S3
default: []
selector:
action: {}
button_4:
name: Button S4
description: Action to run on Button S4
default: []
selector:
action: {}
button_5:
name: Button S5
description: Action to run on Button S5
default: []
selector:
action: {}
button_6:
name: Button S6
description: Action to run on Button S6
default: []
selector:
action: {}
source_url: https://community.home-assistant.io/t/...
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input icasa_remote
action:
- choose:
- conditions:
- condition: template
value_template: '{%if trigger.event.data.command == "off"%}true{%else%}false{%endif%}'
sequence: !input 'button_off'
- conditions:
- condition: template
value_template: '{%if trigger.event.data.command == "on"%}true{%else%}false{%endif%}'
sequence: !input 'button_on'
- conditions:
- condition: template
value_template: '{%if trigger.event.data.command == "recall" and trigger.event.data.args == [0,1]%}true{%else%}false{%endif%}'
sequence: !input 'button_1'
- conditions:
- condition: template
value_template: '{%if trigger.event.data.command == "recall" and trigger.event.data.args == [0,2]%}true{%else%}false{%endif%}'
sequence: !input 'button_2'
- conditions:
- condition: template
value_template: '{%if trigger.event.data.command == "recall" and trigger.event.data.args == [0,3]%}true{%else%}false{%endif%}'
sequence: !input 'button_3'
- conditions:
- condition: template
value_template: '{%if trigger.event.data.command == "recall" and trigger.event.data.args == [0,4]%}true{%else%}false{%endif%}'
sequence: !input 'button_4'
- conditions:
- condition: template
value_template: '{%if trigger.event.data.command == "recall" and trigger.event.data.args == [0,5]%}true{%else%}false{%endif%}'
sequence: !input 'button_5'
- conditions:
- condition: template
value_template: '{%if trigger.event.data.command == "recall" and trigger.event.data.args == [0,6]%}true{%else%}false{%endif%}'
sequence: !input 'button_6'
FYI, if it helps there is a relative PR with button mappings that deCONZ use for iCasa Pulse 2, Pulse 4S and Pulse 8S here:
https://github.com/dresden-elektronik/deconz-rest-plugin/pull/4160
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
It would be still nice if the device is available in ZHA natively. Any chance?
It would be still nice if the device is available in ZHA natively. Any chance?
There is a draft pull request here from @Emrvb that you could try -> https://github.com/zigpy/zha-device-handlers/pull/1039
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Should probably be re-open and not closed until at least open PR is merged? That PR is still waiting for review -> https://github.com/zigpy/zha-device-handlers/pull/1039
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Should probably be left open at least until PR https://github.com/zigpy/zha-device-handlers/pull/1039 is closed?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Is your feature request related to a problem? Please describe. icasa Pulse 8s is not recognized by zha
Describe the solution you'd like Being able to switch lights with the device
Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.
Additional context I got working on the quirk by adapting the IKEA 5 button remote but am now stuck:
I've added the debug log and now get a ton of lines when I press a button:
Short pressing S1 button:
Short pressing S2:
In AREQ AF incomingMsg the x01 on the end of the data key is button S1, x02 is button S2 etc
This is the off button:
and the on button:
Longpress S1 (store scene according to manual):
and Longpress S2:
Longpress off:
and on release:
Longpress on:
and on release: