Don't add level parameter on command if device don't have dimmer.

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
Thorgal789
Posts: 852
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Don't add level parameter on command if device don't have dimmer.

Post by Thorgal789 »

Hello, when you make an action on a device It trigger something like that

2019-10-31 16:51:34.247 Status: User: Admin initiated a switch command (93/device/Off)
2019-10-31 16:51:34.256 (plugin) onCommand called for Unit 2: Parameter 'Off', Level: 0

If the device is an rgb bulb, there is the parameter "Hue" else this one is empty.
But for "level", this parameter is always here, even with a device that can make only on / off.
Impossible to differentiate a level = 0 command or a device without dimmer.

Will be nice if level = '' or "-1" is it need to be a numeric value in the situation the device haven't dimmer.

It will be realy usefull for somes scripts.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest