Hi!
How can I change my switch state by parameter?
I have a swhitch device, but cannot change there state.
This work:
Text device: domoticz.devices("Time stamp error history entry 1").updateText(item.json["6800"].value)
Temperature device: domoticz.devices('Boiler temp actual value').updateTemperature(tonumber(item.json["8310"].value))
Counter device: domoticz.devices("Fan speed").updateCounter(item.json["8323"].value)
domotic.devices("XYZ) .updateText .updateTemperature and .updateCounter are working. But what is doing with virtualswitch ?
I found only .switchOn and switchOff and .toggleSwitch function. But how can I set my switch state by parameter? ( without if function)
Thanks.
set switch state by parameter dzvents
Moderator: leecollings
-
- Posts: 661
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: set switch state by parameter dzvents
I have not tried it but the dzvents wiki page states:
Code: Select all
There are many switch-like devices. Not all methods are applicable for all switch-like devices. You can always use the generic setState(newState) method.
-
- Posts: 31
- Joined: Friday 13 October 2017 19:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: set switch state by parameter dzvents
Hi!
Thanks! This was a solution.
Thanks! This was a solution.
- waltervl
- Posts: 5907
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: set switch state by parameter dzvents
What subtype of virtual switch are you using? There are many.https://www.domoticz.com/wiki/Dummy_for ... h_Subtypes
Each switch type has specific dzvents switch options next to the general ones.
Each switch type has specific dzvents switch options next to the general ones.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest