Closes #453 - Added in @SilvrrGIT code for some interesting tweets on @BearStoneHA twitter account.

This commit is contained in:
ccostan 2018-11-26 13:47:27 -05:00
parent 4c0205a6a5
commit f079a7c91f
3 changed files with 18 additions and 22 deletions

View File

@ -45,7 +45,7 @@ sensor:
resource: https://192.168.10.90/api/meters/aggregates
method: GET
verify_ssl: false
value_template: '{{ value_json.site.instant_power / 1000 }}'
value_template: '{{ value_json.site.instant_power / 1000 | round(2) }}'
unit_of_measurement: kWh
- platform: rest
@ -53,7 +53,7 @@ sensor:
resource: https://192.168.10.90/api/meters/aggregates
method: GET
verify_ssl: false
value_template: '{{ value_json.solar.instant_power / 1000 }}'
value_template: '{{ value_json.solar.instant_power / 1000 | round(2) }}'
unit_of_measurement: kWh
- platform: rest
@ -61,7 +61,7 @@ sensor:
resource: https://192.168.10.90/api/meters/aggregates
method: GET
verify_ssl: false
value_template: '{{ value_json.battery.instant_power / 1000 }}'
value_template: '{{ value_json.battery.instant_power / 1000 | round(2) }}'
unit_of_measurement: kWh
icon_template: >-
{%- if states('sensor.powerwall_battery_now') | float > 0 %}

View File

@ -28,23 +28,17 @@ notify:
### Building out some Historical stats for tweeting. #####################
sensor:
- platform: command_line
command: 'curl https://api.github.com/repos/ccostan/home-assistantconfig'
name: GitHub Stats
scan_interval: 20000
value_template: '{{ value_json.name }}'
json_attributes:
- open_issues
# - subscribers_count
# - forks
- stargazers_count
# - platform: sql
# db_url: sqlite:///home-assistant_v2.db
# queries:
# - name: "Solar 24h"
# column: 'solar_kwh'
# unit_of_measurement: 'kWh'
# query: >-
# SELECT ROUND(SUM(solar_kwh), 2) AS solar_kwh
# FROM (
# SELECT AVG(state) AS solar_kwh
# FROM states
# WHERE entity_id = 'sensor.solar_now'
# AND state != 'unknown'
# AND last_updated >= DATE_SUB(UTC_TIMESTAMP(), INTERVAL 24 HOUR)
# GROUP BY HOUR(last_updated)
# ) AS total_kwh;
- platform: history_stats
name: Doorbell Presses
@ -318,7 +312,7 @@ automation:
pick: >-
{% set pick = [
"solar", "solar", "solar",
"robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot","robot","robot","robot","robot",
"robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot","robot","robot","robot","robot","robot",
"door", "door", "door",
"weather", "weather", "weather", "weather", "weather",
"cloud",
@ -327,6 +321,6 @@ automation:
"night", "night",
"tv", "tv", "tv",
"throwback",
"promo"
"promo", "promo"
] %}
{{ pick|random }}

View File

@ -17,7 +17,8 @@ tweet_engine_setup:
"Be Sure to follow all of my Twitter Accounts! @CCostan @BearStoneHA",
"Be sure to like me on Facebook and join our HA group! (https://www.facebook.com/groups/HomeAssistant/) (https://www.facebook.com/VMwareInfo/) (https://www.facebook.com/BearStoneHA/)",
"You can see how ALL of this is done by browsing my GitHub Repository (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"If you aren't subscribed to our YouTube channel, you are missing out on the goodies! (https://youtube.com/vCloudInfo)"
"If you aren't subscribed to our YouTube channel, you are missing out on the goodies! (https://youtube.com/vCloudInfo)",
"Join our GitHub repo (https://github.com/CCOSTAN/Home-AssistantConfig#logo) with {{ states.sensor.github_stats.attributes.stargazers_count}} other users. Browse the {{ states.sensor.github_stats.attributes.open_issues }} #Todo items."
],
"solar": [
"I am keeping track of the current #Tesla stock price. It is ${{ states('sensor.tesla')|round }}. #Solar",
@ -48,6 +49,7 @@ tweet_engine_setup:
"The #Docker Host for Home Assistant is using {{ states('sensor.disk_use_percent_') }}% of the hard drive currently. (http://www.vmwareinfo.com/2018/02/journey-to-docker.html)",
"I am running Home Assistant version {{ states('sensor.ha_installed_version') }} (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"Home Assistant has been running for {{ states('sensor.ha_uptime') }}. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"The Github code (https://github.com/CCOSTAN/Home-AssistantConfig#logo) has {{ states.sensor.github_stats.attributes.stargazers_count}} stars and counting. Currently with {{ states.sensor.github_stats.attributes.open_issues }} open #Todo items."
"My Home Assistant has been tested by Travis-CI and {{states('sensor.ccostanhomeassistantconfig_state')}}. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"{{((states.sensor.sensor_count.state | int) + (states.sensor.binary_sensor_count.state | int))}} sensors feed my Smart Home #data. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"{{states.sensor.automation_count.state}} automations and {{states.sensor.script_count.state}} scripts make my home smart (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",