Home-AssistantConfig/config/packages/grafana.yaml.disabled

54 lines
2.3 KiB
Plaintext
Executable File

#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# More Info : https://www.vcloudinfo.com/
#-------------------------------------------
sensor:
- platform: command_line
name: "Download Grafana Solar"
command: 'curl -s -H "Authorization: Bearer eyJrIjoiZ0UwS1hpRVdCbFVVSTNSdER0Z29maHc4QmVuSXhxalYiLCJuIjoiSEFDYW1lcmEiLCJpZCI6MX0=" "http://192.168.10.10:3000/render/d/h_wosLIik/solar?orgId=1&from=now-1d%2Fd&to=now-1d%2Fd&height=750&width=1920" > /config/www/custom_ui/floorplan/images/branding/solar_readings.png'
scan_interval: 3000
- platform: command_line
name: "Download Grafana ATT SpeedTest"
command: 'curl -s -H "Authorization: Bearer eyJrIjoiZ0UwS1hpRVdCbFVVSTNSdER0Z29maHc4QmVuSXhxalYiLCJuIjoiSEFDYW1lcmEiLCJpZCI6MX0=" "http://192.168.10.10:3000/render/d/bdR1ZnFZk/att-speedtest?viewPanel=2&orgId=1" > /config/www/custom_ui/floorplan/images/branding/att_speedtest.png'
scan_interval: 3000
camera:
- platform: generic
name: "Grafana Solar Graph"
still_image_url: 'http://192.168.10.10:3000/render/d/h_wosLIik/solar?orgId=1&from=now-1d%2Fd&to=now-1d%2Fd&height=750&width=1920'
username: HA
password: HA
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
automation:
- alias: 'Tweet Solar Production'
id: bd698bd9-780b-4268-bf90-2c7ff6daae99
trigger:
- platform: sun
event: sunset
offset: '+02:30:00'
action:
- service: script.tweet_engine_image
data:
tweet: >-
{{ [
"I have just finished crunching the numbers and here is the latest #Solar Production graph. "
] | random + " #Charts #Tesla "
+ [
"(https://youtu.be/BartadUzGOA)",
"(https://www.vcloudinfo.com/2018/01/going-green-to-save-some-green-in-2018.html)",
"(https://www.vcloudinfo.com/2018/09/re-installing-tesla-solar-panels-again.html)"
]| random
}}
image: >-
{% set pictures = [
"/config/www/custom_ui/floorplan/images/branding/solar_readings.png"
] %}
{{ pictures|random }}