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

Update philips.js #3557

Merged
merged 11 commits into from
Dec 23, 2021
Merged

Update philips.js #3557

merged 11 commits into from
Dec 23, 2021

Conversation

Burki24
Copy link
Sponsor Contributor

@Burki24 Burki24 commented Dec 21, 2021

Added "duration" to exposes. Need this for using dimming-function in Symcon. Hopefully, it's okay for all.

Added "duration" to exposes. Need this for using dimming-function in Symcon. Hopefully, it's okay for all.
Sorry, line to long.
Next try, used to many spaces.
Wrong unit used, sorry.
@@ -1739,7 +1739,8 @@ module.exports = [
fromZigbee: [fz.ignore_command_on, fz.ignore_command_off, fz.ignore_command_step, fz.ignore_command_stop,
fz.legacy.hue_dimmer_switch, fz.battery],
exposes: [e.battery(), e.action(['on-press', 'on-hold', 'on-hold-release', 'up-press', 'up-hold', 'up-hold-release',
'down-press', 'down-hold', 'down-hold-release', 'off-press', 'off-hold', 'off-hold-release'])],
'down-press', 'down-hold', 'down-hold-release', 'off-press', 'off-hold', 'off-hold-release']),
exposes.numeric('duration', ea.STATE).withUnit('s')],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duration is legacy and has been removed (https://www.zigbee2mqtt.io/devices/324131092621.html#options)

Copy link
Sponsor Contributor Author

@Burki24 Burki24 Dec 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason for that?
Did I missed something because it is send by the devices without having activate legacy-api.
Is there an alternative, that I can use?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did I missed something because it is send by the devices without having activate legacy-api.

The legacy api is enabled by default, you have to explicitly disable it as mentioned on https://www.zigbee2mqtt.io/devices/324131092621.html#options

Is there an alternative, that I can use?

action_duration

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The legacy api is enabled by default, you have to explicitly disable it as mentioned on

I thought, it's enough to disable legacy-api generally in settings->advance. Thanks.
What is the diference between disabeling legacy-api in settings and disabeling legacy in devices?

action_duration

Thanks, I'll try that.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The legacy api is the old MQTT api (has nothing to do with this)

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I switched from duration to action_duration.

Change from legacy action to action_duration.
Thanks koenkk.
Sorry, small Error
@Koenkk
Copy link
Owner

Koenkk commented Dec 22, 2021

I see you added duration to the action list now, but this is not correct, it should be a separate expose (like you had in c888fde but then called action_duration instead of duration)

Hi Koenk,

I'm really thankfull for your support. That are mistakes, I do only once a time. But to my apologies, I am really a complete beginner at programming. 
Hopefully now it's all okay. On my local machine, it's running well.

Many, many thanks.
@Burki24
Copy link
Sponsor Contributor Author

Burki24 commented Dec 23, 2021

I see you added duration to the action list now, but this is not correct, it should be a separate expose (like you had in c888fde but then called action_duration instead of duration)

Hi Koenk,

I'm really thankfull for your support. That are mistakes, I do only once a time. But to my apologies, I am really a complete beginner at programming.
Hopefully now it's all okay. On my local machine, it's running well.

Many, many thanks.

@Koenkk
Copy link
Owner

Koenkk commented Dec 23, 2021

Looks good, thanks!

@Koenkk Koenkk merged commit 5aa94a4 into Koenkk:master Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants