Ubibot sensors

Ubibot sensors are very common so I was surprised there was no integration. Editing the configuration file is pretty advanced stuff and there is no “undo” option other than backing up.
I understand I need to add this code to the YAML file:

Sensor 1:
 platform: rest 
 resource: http://api.ubibot.io/channels/16639?parameters&account_key=xxx
 name: ubibot_basement_humidity
  value_template: ‘{{ (value_json.channel.last_values|from_json).field2.value|round()|float }}’

My questions are

  1. Does each ubibot channel need to be added separately?
  2. Does the value_template need amending or is that the same for every channel?
  3. Does the HA need to be restarted (reloading the YAML is insufficient?).
  4. Is it safe to use GitHub - ms32035/home-assistant-ubibot: Ubibot integration for home assistant assuming one has managed to install HACS? I get lots of warnings with HACS being dangerous to use!
1 Like

Each resource needs to be defined separately.
You can fetch multiple sensors at once from one resource.
After the very first rest sensor, yaml reloading is enough. But for the first one, restart is required.
HACS is not dangerous itself but any custom component might install dangerous staff :slight_smile: so check comments, stars and issues before installing the custom component.

1 Like