Hi
I made a script that changes the block title when the state of the device changes
Problem is that the title does not change.
When the switch 1474 is On the title must be test1 and test2 when off...
function getChange_1474(idx,value,device){
if(parseFloat(device['state'])='On'){
blocks['1474']['title'] = 'test1';
}
else {
blocks['1474']['title'] = 'test2';
}
}
change block/device title when value changes Topic is solved
Moderators: leecollings, htilburgs, robgeerts
-
pvklink
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
change block/device title when value changes
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
- HansieNL
- Posts: 969
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: change block/device title when value changes
Can you try:
Code: Select all
function getStatus_1474(idx,value,device){
if (device.Data == "On") {
blocks[1474]['title'] = "test1"
}
else {
blocks[1474]['title'] = "test2"
}
}Blah blah blah
-
pvklink
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
Re: change block/device title when value changes
thanks!
will try that!
will try that!
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
-
pvklink
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
Re: change block/device title when value changes
yes works!
thanks Hansie
thanks Hansie
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
Who is online
Users browsing this forum: No registered users and 1 guest