Domoticz-Google-Assistant
Domoticz-Google-Assistant copied to clipboard
Adding device type: "Dimmer"
Is your feature request related to a problem? Please describe. I would like to use the command "All lights on" and this command should trigger only those devices which have device type "Light". When giving that command at this moment also the lights with device type "Colorswitch" are activated.
I hope there is a solution in DZGA for this, because I want to be able to set them to on/off and dimming with %. When in device configuration device type is set to "Switch" I can only set them on or off.
Describe the solution you'd like A feature for device type like being "Dimmer"
Describe alternatives you've considered I'm aware of the feature to use "routines" within Google Home but thats not what I want/the way I want to use this.
Additional context
In Google Assistant treat dimmer as a light. GA dont have any option for color switches but I will look into this.
In Google Assistant treat dimmer as a light. GA dont have any option for color switches but I will look into this.
Let me explain on an other way: I have 5 Shelly S, these 5 appear in Domoticz as "Light switch (On-Off)" Then I have 10 Shelly Dimmer2 which appear in Domoticz as "Color Switch Dimmer"
When I give my Google Hub the voice command "All lights on" then GA wilt switch on 15 lights (5 Shelly S and 10 Shelly Dimmer 2. Within DZGA a Shelly Dimmer2 appears as "Color Switch", not as "Light" nor as "Dimmer". When using the Device_config I can only setup light or switch as device type. Within Light there is no option to use "Dimmer". When setting a Shelly Dimmer2 as Light in Device_Config it only reacts to on/off, dimming is not possible.
So the voice command "all lights on (or off)" should only trigger those device types with light (Shelly plug S). For example the voice command "all dimmers on 50%" should only trigger those device types which are dimmer (Color Switch).
I hop this makes it a bit more clear what I'm trying to achive.
Maybe I have to add shelly dimmer to the code. Paste the json output here for that device e.g http://your.domoticz.ip:8080/json.htm?type=devices&rid=DEVICEIDX
Hi DewGew,
Great that you want to have a look at this issues, many thanks!
Hereby the output of one of mine Shelly dimmer2 devices: { "ActTime" : 1663668042, "AstrTwilightEnd" : "21:33", "AstrTwilightStart" : "05:28", "CivTwilightEnd" : "20:14", "CivTwilightStart" : "06:48", "DayLength" : "12:20", "NautTwilightEnd" : "20:53", "NautTwilightStart" : "06:09", "ServerTime" : "2022-09-20 12:00:42", "SunAtSouth" : "13:31", "Sunrise" : "07:20", "Sunset" : "19:41", "app_version" : "2022.1", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "Color" : "", "CustomImage" : 0, "Data" : "Off", "Description" : "", "DimmerType" : "abs", "Favorite" : 1, "HardwareDisabled" : false, "HardwareID" : 7, "HardwareName" : "Shelly", "HardwareType" : "Shelly MQTT", "HardwareTypeVal" : 94, "HaveDimmer" : true, "HaveGroupCmd" : false, "HaveTimeout" : false, "ID" : "shellydimmer2-XXXXXXXXXXX-0-dimmer", "Image" : "Light", "IsSubDevice" : false, "LastUpdate" : "2022-09-19 20:14:28", "Level" : 42, "LevelInt" : 42, "MaxDimLevel" : 100, "Name" : "Veranda", "Notifications" : "false", "PlanID" : "3", "PlanIDs" : [ 3, 15 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : "-", "Status" : "Off", "StrParam1" : "", "StrParam2" : "", "SubType" : "White", "SwitchType" : "Dimmer", "SwitchTypeVal" : 7, "Timers" : "false", "Type" : "Color Switch", "TypeImg" : "dimmer", "Unit" : 208, "Used" : 1, "UsedByCamera" : false, "XOffset" : "382", "YOffset" : "521", "idx" : "396" } ], "status" : "OK", "title" : "Devices" }
It should be shown as a dimmer with color. Do you run master or beta?
Edit: To get all functions, set this device as Dimmer in Domoticz device settings. Remove all Device_Config for this device in dzga or in description in domoticz device settings then try again.
Hi DewGew,
I use Master.
In Domoticz this device is already set as dimmer, I don't have descriptions added in domoticz to none of the devices (description fields are empty for all devices). I don't have any device_config for these type of devices in DZGA setup.
EDIT: the Shelly Dimmer2 device can only dim and has no feature with color. Please also take notice of my post in Domoticz forum: https://www.domoticz.com/forum/viewtopic.php?p=292793#p292793
Any update about this enhancement/issue?
Domoticz treat this device as "Type" : "Color Switch", If its not a color switch you have to change settings in domoticz.
Issue is found and fixed. The Shelly-MQTT python plugin which I use contains an error, I had to enter some new code so that dimmer2 devices were seen as switches with dimmer. Now fixed. This issue can be closed.