Page 1 of 1

Combination of a Dummy switch + text device

Posted: Monday 22 February 2016 0:27
by Holland
Just wondering if there is already something available where I can show a dynamic text within a switch button.

Quite similar to the mediaplayer button used for Kodi. If a movie is playing the button also shows the title of the movie

thanks

Re: Combination of a Dummy switch + text device

Posted: Tuesday 23 February 2016 14:04
by pluggin
I use a dummy TEXT sensor and with a script change the svalue. The only problem is don“t log the info over time

dec=$data
curl -s "http://192.168.0.8:9550/json.htm?type=c ... value=$dec" > /dev/null

Is this what you looking for?

Re: Combination of a Dummy switch + text device

Posted: Wednesday 24 February 2016 0:33
by Holland
That is one of things I'm trying to achieve. The text (the above variable dec) should display on a switch icon

See the below media button I use for Kodi.

Re: Combination of a Dummy switch + text device

Posted: Wednesday 24 February 2016 13:56
by pluggin
Yes, the $dec variable, the contains the value you want to display in the text sensor

Re: Combination of a Dummy switch + text device

Posted: Friday 26 February 2016 23:41
by Holland
But with just a textsensor I can't switch anything.

The above image is a switch, but with the functionality of a text sensor integrated. The circled part is dynamic.

Re: Combination of a Dummy switch + text device

Posted: Tuesday 22 March 2016 20:31
by hendrik6073
how do you handle white spaces in text ? if i add white spaces text is not displayed. i can work around it by placing dots and underscores, text is not clearly readeble with all those dots and underscores. Also would like to use the \n newline character to ge info clear and readable in ImperiHome buttons

Re: Combination of a Dummy switch + text device

Posted: Tuesday 17 May 2016 14:57
by Yann
For the white space, insert %20 instead and it will work.

Re: Combination of a Dummy switch + text device

Posted: Monday 14 August 2017 11:47
by ronnyandre
Is this something that is possible in current version of Domoticz?