I'm developping a plugin using the Python API.
I tried to create contact switch devices but when I update their numerical values and string values of the devices the string values are ignored and only Open or Close is displayed.
For example :
Code: Select all
Devices[ idx ].Update( nValue = 1, sValue="custom string", Image = Images[ 'testimg' ].ID ) # 'custom string' is never displayed.
Code: Select all
Devices[ idx ].Update( nValue = 1, sValue="custom string", Image = Images[ 'testimg' ].ID ) # custom image is never displayed.
Code: Select all
if 'testimg' not in Images:
Domoticz.Image( 'Icons.zip' ).Create()
1. Is it possible to display custom text with contact switch devices ?
2. Is it possible to use custom image with text devices ?
Both are useful.
Using a custom image with text devices can help users to know the general state of the device without having to read the associated text and the fully description is in the associated text.
Using custom text with contact devices are very convenient when their are use as a read only on/off swicth. So their numerial state (on/off) can be used in dzVents scripts instead of comparing a text of a text device.