Welcome, Guest
Username: Password: Remember me

TOPIC: Change Icon automatically

Change Icon automatically 3 months 6 days ago #3852

Hello,

I want to change automatically the icon of a MQTT Node when the main Node parameter achieves a minimum level set in a VIRTUAL Node.
Ist it possible to do it via automation? It seems it is not alloed to change the parameter Settings.Icon automatically...

Thanks!
The administrator has disabled public write access.

Change Icon automatically 3 months 5 days ago #3853

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 833
  • Thank you received: 258
  • Karma: 24
dubaleeiro wrote:
Hello,

I want to change automatically the icon of a MQTT Node when the main Node parameter achieves a minimum level set in a VIRTUAL Node.
Ist it possible to do it via automation? It seems it is not alloed to change the parameter Settings.Icon automatically...

Thanks!

You can change icon via automation. Just set value of Settings.Icon1 parameter to new icon name via automation.
The administrator has disabled public write access.

Change Icon automatically 3 months 5 days ago #3854

Hi,
Thanks a lot for the quick reply.

I tried to do so using the driver Domains.MQTTClient, but I got the following error:

"Domains' does not contain a definition for `MQTTClient'"

This is the code:

{
   EventHelper.ModuleChangedHandler((o, m, p) =>
    {
      // outdoor
      if (m.Domain == Domains.MQTTClient && m.Address == "N2S0" && p.Property == "Sensor.AnalogValue")
        ModuleHelper.SetProperty(Domains.MQTTClient, "N2S0", "Settings.Icon", "accepted.png");     
        return true;
    });
}

Did I do something wrong?
Thanks!
The administrator has disabled public write access.
Time to create page: 0.125 seconds
Powered by Kunena Forum