Autor Thema: Sending values to LCD  (Gelesen 2472 mal)

Offline djrm

  • New Member
  • *
  • Beiträge: 5
Sending values to LCD
« am: 24 Juli 2014, 21:03:53 »
Greetings everyone.
I still quite new to configuring fhem and have what is probably a simpe question to anser please.
I have an LCD device on a 1wore bus which I can write text to like this:
set LCD_Driver line20.0 "hello"
I also have a device which I can display a reading from like this:
 { my @a = split(" ", Value("SolarCharger"));; $a[2] }
I cannot see how to combine these to put the value onto the display.
Whenever I do I see the text of the command on the display, i.e. it is not evaluated but just copied.
Please help me.
Kind regards, David.

Offline bugster_de

  • Sr. Member
  • ****
  • Beiträge: 893
Antw:Sending values to LCD
« Antwort #1 am: 12 September 2014, 09:31:13 »

not sure, if this question is still open.
Would be great, if you could paste the full code line, that is not working correctly.

I would assume, that this should work:

set LCD_Driver line 20.0 { my @a = split( " ", ReadingsVal( "SolarCharger", "state", "default");; if( @a >= 3 ) { return( $a[2] ) } else { return( "default" );; } }

Offline djrm

  • New Member
  • *
  • Beiträge: 5
Antw:Sending values to LCD
« Antwort #2 am: 12 April 2021, 21:20:58 »
Thank for the reply, my system has been down for a good while but I'm bringing it back up now so I'll be able to use my display again shortly. Kind regards, David.