Created
June 20, 2017 10:15
-
-
Save hersche/d3793ddd5ae9522afc5c7871cd7ea001 to your computer and use it in GitHub Desktop.
getting and logging rpi3 temp in hass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
fo = os.popen('vcgencmd measure_temp').read() | |
print(fo.split("=")[1].replace("'C\n","")) | |
# config for hass | |
sensor: | |
- platform: command_line | |
command: sudo -u mycroft python /usr/bin/piTemp.py | |
unit_of_measurement: "C (CPU)" | |
name: "Raspberry Temp" | |
scan_interval: 60 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment