Adding °C (special character) to command line sensor (plotting history form several sources)

Hi pap247,

I haven’t used the RM bridge app - I have been using the Tasker app compatible:

it is paid but the Dev has been working on it lately and will be adding more support for other Broadlink products (I have an S1 I am keen to get incorporated). Definitely worth the price of the app if you ask me.

Here is my current setup:

Reading Temperature form my RMPro:

I have a script returning the temperature and a command line sensor to bring the temperature back into HASS. (I should probably change this to a scrape sensor as it would make things tidier as I will not need the script)

Script to read temperature:

#!/bin/bash
rmout=$(curl -s http://<BridgeIP>:9876/temperature?deviceMac=<RM_Mac>)
echo "$rmout" | grep -o -P '(?<="temperature":).*(?=,"timestamp")'

where you replace the following:
BridgeIP is the ip of the android device with the app installed (with the bridge running on port 9876)
RM_Mac is the Mac address of the RM device

Add this to the config

# RM temperature
  - platform: command_line
    command: <PATH_TO_SCRIPT>
    name: RM Pro Temp
    unit_of_measurement: "°C"

There is a helpful API that is set up on the bridge android device at http://BridgeIP:9876/

also note that it also outputs the temperature in F if that is what you prefer in your part of the planet. you will just need to grep the last value from the output.