Trying to create a package for my Playstation 4 setup
playstation_package:
shell_command:
## https://github.com/dhleong/ps4-waker/wiki ##
playstationvue_start: "ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.66 --bind-port 997; sudo ps4-waker -c /config/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.66 --bind-port 997 start CUSA00960"
playstationplex_start: "ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.66 --bind-port 997; sudo ps4-waker -c /config/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.66 --bind-port 997 start CUSA01850"
playstationyoutube_start: "ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.66 --bind-port 997; sudo ps4-waker -c /config/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.66 --bind-port 997 start CUSA01015"
playstationnetflix_start: "ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.66 --bind-port 997; sudo ps4-waker -c /config/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.66 --bind-port 997 start CUSA00129"
sensor:
- platform: command_line
name: Current Game
command: ps4-waker search | grep -w "running-app-name" | cut -c 24- | rev | cut -c 3- | rev | sed 's/[!@#\$%^&*(®)™]//g'
scan_interval: 10
switch:
platform: command_line
switches:
playstation4:
command_on: 'ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.184 --bind-port 997'
command_off: 'ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.184 --bind-port 997 standby'
command_state: 'nc -z -w 5 192.168.1.184 997'
friendly_name: "Playstation 4"
input_select:
## https://github.com/dhleong/ps4-waker/wiki ##
playstation4app:
name: App Selection
options:
- "-- Select --"
- "Netflix"
- "Plex"
- "Vue"
- "Youtube"
initial: "-- Select --"
icon: mdi:apps
group:
playstation:
name: Playstation 4
entities:
- switch.playstation4
- input_select.playstation4app
- sensor.current_game
And it doesn’t like my switch configuration. It appears to setup ok, but throws the following errors.
17-04-17 12:03:00 ERROR (MainThread) [homeassistant.components] Testing configuration at /config
17-04-17 12:02:59 ERROR (MainThread) [homeassistant.config] Invalid config for [switch]: required key not provided @ data['platform']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch/
Failed config
switch:
- platform: command_line
switches: [source /config/includes/packages/playstation4.yaml:18]
playstation4: [source /config/includes/packages/playstation4.yaml:19]
command_off: ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.184 --bind-port 997 standby
command_on: ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.184 --bind-port 997
command_state: nc -z -w 5 192.168.1.184 997
friendly_name: Playstation 4
Successful config (partial)
switch:
- platform: command_line
switches: ?
playstation4: ?
command_off: ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.184 --bind-port 997 standby
command_on: ps4-waker -c /config/custom_scripts/ps4-waker/.ps4-wake.credentials.json -b 192.168.1.188 -d 192.168.1.184 --bind-port 997
command_state: nc -z -w 5 192.168.1.184 997
friendly_name: Playstation 4
Any thoughts?