Uplink function - how to change data label and icon using data bindings?

You can’t set the icon property of a label to be html.
You can set it to a string (e.g. fa:heart) or a url to an image/svg file (e.g. _/theme/img.png).

To use the newer version of fonteawesome include the script tag in your native libraries (see the Theme section of your app).

If you are just using the free version then you should be able to include almost all the icons you need without having to do anything fancy.

e.g. the following code should just work

 def timer_tick(self, **event_args):
      door_status = anvil.server.call_s('check_door_status') 
      # call_s is a slient call - i.e. no loading indicator
      self.door_status_label.text = door_status
      if door_status == 'Fermée':
        self.door_icon_label.icon = 'fa:door-closed'
      elif door_status == 'Ouverte':
        self.door_icon_label.icon = 'fa:door-open'
      elif door_status == 'Alarme LS001' or door_status == 'Alarme LS002':
        self.door_icon_label.icon = 'fa:exclamation'

If you have pro icons then see this thread: