Advanced ReadingsGroup

Begonnen von andyclimb, 22 Juni 2017, 14:06:08

Vorheriges Thema - Nächstes Thema

andyclimb

I have an MQTT device that creates the following readings `IP` and 'state`.  I've previously created a readingsGroup that creates URLs for each of the devices by modifying the %READING in value format. 

What I would love to do it combine the two, so that the link is displayed to the device, and when clicked opens up the IP, but the colour is dependent on if the status is online, or disconnected.

At the moment I have this:

defmod MQTT_IPs readingsGroup mqtt_.*:IP.* mqtt_.*:status.*
attr MQTT_IPs alias ESP DEVICE LIST
attr MQTT_IPs mapping {state => "<a href='http://$VALUE' target=\"_blank\">$DEVICE</a>"}
attr MQTT_IPs nolinks 1
attr MQTT_IPs notime 1
attr MQTT_IPs valueFormat 1


which does not work. 
AM