Update to Command Line Sensors - Breaking Changes Fix.

This commit is contained in:
ccostan 2023-06-19 16:12:32 -04:00
parent c6ec82c21e
commit bfc7ece391
11 changed files with 36 additions and 43 deletions

View File

@ -1 +1 @@
2023.5.3 2023.6.2

View File

@ -25,10 +25,11 @@
- fri - fri
action: action:
- service: light.turn_on - service: homeassistant.turn_on
entity_id: entity_id:
- light.d1 - light.d1
- light.d2 - light.d2
- switch.office_lamp_switch_socket
- service: light.turn_off - service: light.turn_off
entity_id: entity_id:
- light.dining_room_lights - light.dining_room_lights

View File

@ -12,6 +12,7 @@ Interior Switches:
- switch.living_room_outlet - switch.living_room_outlet
- switch.living_room_outlet_2 - switch.living_room_outlet_2
- switch.living_room_tv_outlet - switch.living_room_tv_outlet
- switch.office_lamp_switch_socket
Kitchen Accents: Kitchen Accents:
entities: entities:

View File

@ -70,7 +70,7 @@ automation:
- delay: '00:20:00' - delay: '00:20:00'
- service: media_player.play_media - service: media_player.play_media
data: data:
entity_id: media_player.stacey_bedroom entity_id: media_player.kitchen_show
media_content_id: 'hide garage camera' media_content_id: 'hide garage camera'
media_content_type: custom media_content_type: custom

View File

@ -62,16 +62,6 @@ sensor:
################################################################################ ################################################################################
# Countdown Sesor using WolfRam Alpha Natural language queries # Countdown Sesor using WolfRam Alpha Natural language queries
################################################################################ ################################################################################
#
# - platform: command_line
# name: Halloween Countdown
# command: "HALLOWEEN=`date -d 'Oct 31' +%j | awk '{print $1 + 0}'`; TODAY=`date +%j | awk '{print $1 + 0}'`; DAYS=$(($HALLOWEEN - $TODAY)); echo $DAYS"
# scan_interval: 43200
#
# - platform: command_line
# command: "XMAS=`date -d 'Dec 25' +%j | awk '{print $1 + 0}'`; TODAY=`date +%j | awk '{print $1 + 0}'`; DAYS=$(($XMAS - $TODAY)); echo $DAYS"
# name: Christmas Countdown
# scan_interval: 43200
- platform: rest - platform: rest
name: Halloween Countdown name: Halloween Countdown

View File

@ -8,12 +8,11 @@
# juicenet: # juicenet:
# access_token: !secret juicenet_access_token # access_token: !secret juicenet_access_token
command_line:
switch: switch:
- platform: command_line name: Restart Juicebox
switches: unique_id: restart_juicebox_switch
juicebox_restart:
command_on: "/usr/bin/curl -k 'http://192.168.10.91/command/reboot'" command_on: "/usr/bin/curl -k 'http://192.168.10.91/command/reboot'"
friendly_name: Restart Juicebox
############################################################################# #############################################################################
### Automations - Alerts related to the JuiceBox (https://amzn.to/2AZVQ37) ### Automations - Alerts related to the JuiceBox (https://amzn.to/2AZVQ37)
@ -62,7 +61,7 @@ automation:
action: action:
- service: homeassistant.turn_on - service: homeassistant.turn_on
entity_id: switch.juicebox_restart entity_id: switch.restart_juicebox
- service: script.tweet_engine_image - service: script.tweet_engine_image
data: data:

View File

@ -4,6 +4,25 @@
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#------------------------------------------- #-------------------------------------------
### Building out some Historical stats for tweeting. #####################
command_line:
- sensor:
name: 'Lines of Code'
unique_id: lines_of_code
command: "find /config -name '*.yaml' | xargs cat | wc -l"
scan_interval: 20000
command_line:
- sensor:
name: 'GitHub Stats'
unique_id: github_stats_command
command: 'curl https://api.github.com/repos/ccostan/home-assistantconfig'
scan_interval: 20000
value_template: '{{ value_json.name }}'
json_attributes:
- open_issues
- stargazers_count
notify: notify:
- name: BearStoneHA - name: BearStoneHA
platform: twitter platform: twitter
@ -18,26 +37,6 @@ notify:
access_token: !secret twitter_access_token2 access_token: !secret twitter_access_token2
access_token_secret: !secret twitter_access_token_secret2 access_token_secret: !secret twitter_access_token_secret2
### Building out some Historical stats for tweeting. #####################
sensor:
- platform: command_line
command: 'curl https://api.github.com/repos/ccostan/home-assistantconfig'
name: GitHub Stats
unit_of_measurement: 'Count'
scan_interval: 20000
value_template: '{{ value_json.name }}'
json_attributes:
- open_issues
# - subscribers_count
# - forks
- stargazers_count
- platform: command_line
name: Lines of Code
command: "find /config -name '*.yaml' | xargs cat | wc -l"
unit_of_measurement: 'Lines'
scan_interval: 20000
# - platform: history_stats # - platform: history_stats
# name: Doorbell Presses # name: Doorbell Presses
# entity_id: binary_sensor.skybell_front_door_button # entity_id: binary_sensor.skybell_front_door_button
@ -46,7 +45,7 @@ sensor:
# end: '{{ now() }}' # end: '{{ now() }}'
# duration: # duration:
# hours: 24 # hours: 24
sensor:
- platform: history_stats - platform: history_stats
name: Speech time name: Speech time
entity_id: media_player.livingroomCC entity_id: media_player.livingroomCC

View File

@ -336,6 +336,9 @@ tweet_youtube_engine_setup:
], ],
"RunningAutomationsCard": [ "RunningAutomationsCard": [
"What is running in your Home Assistant - A lovelace Card (https://www.vcloudinfo.com/2023/01/whats-running-in-home-assistant-a-lovelace-card.html)" "What is running in your Home Assistant - A lovelace Card (https://www.vcloudinfo.com/2023/01/whats-running-in-home-assistant-a-lovelace-card.html)"
],
"AutoEntityCard": [
"Adjusting the Auto-Entities Card in Home Assistant (https://youtu.be/h3SIhPVAP4k)"
] ]
} %} } %}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB