formatting

This commit is contained in:
Hristo Jelev
2020-04-28 00:14:14 +03:00
parent 52e58e652b
commit ecf799b2c3

View File

@@ -28,7 +28,7 @@ $ pip install paho-mqtt
Copy rpi-cpu2mqtt.py and config.py.example to a folder of your choise (I am using ```/home/pi/scripts/``` ). Copy rpi-cpu2mqtt.py and config.py.example to a folder of your choise (I am using ```/home/pi/scripts/``` ).
Rename config.py.example to config.py and populate the needed variables (MQTT host, user, password and main topic). Rename ```config.py.example``` to ```config.py``` and populate the needed variables (MQTT host, user, password and main topic).
Test the script. Test the script.
```bash ```bash
@@ -46,7 +46,7 @@ Create a cron entry like this (you might need to update the path in the cron ent
Once you installed the script on your raspberry you need to create some sensors in home assistant. Once you installed the script on your raspberry you need to create some sensors in home assistant.
This is the sensors configuration assuming your sensors are separated in sensors.yaml file. This is the sensors configuration assuming your sensors are separated in ```sensors.yaml``` file.
```yaml ```yaml
- platform: mqtt - platform: mqtt
state_topic: "masoko/rpi4/cpuload" state_topic: "masoko/rpi4/cpuload"