I have 4 TP link switches that work fine.
Im trying to add a a switch that works via a python file. I work 100% from putty but I cant get it to appear in the Home Assistant.
This is what I have done so far… TP links work fine but nothing appears for the command line entry.
I do get a invalid config error for switch,command-line.
Here is my configuration.yaml with my details XXX out.
I havent added in the code above but I want to be able to have a switch (in the same place as my TPlink switches) that run these 2 py scripts.
Here is my configuration.yaml with my details XXX out.I havent added in the code above but I want to be able to have a switch (in the same place as my TPlink switches) that run these 2 py scripts.
I tried to change the text @jeremyowens you provided but I kept locking up the home assisitant and had to edit yaml and reboot PI to get it back.
If someone knows and can edit my text that would be a big help…
@jayjay Im using an addon thats attached to the Pi and using RF and scripts is the only thing that works for it. (Energenie PiMote).
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: xxx
longitude: xxx
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 2
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: xxx
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
http:
# Uncomment this to add a password (recommended!)
# api_password: PASSWORD
# Uncomment this if you are using SSL or running in Docker etc
# base_url: example.duckdns.org:8123
# Checks for available updates
updater:
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time.
history:
# View all events in a logbook
logbook:
# Track the sun
# sun:
# Weather Prediction
sensor:
platform: yr
# Text to speech
tts:
platform: google
device_tracker:
- platform: xxx
host: 192.168.xxx
username: xxx
password: xxx
interval_seconds: 10
consider_home: 180
track_new_devices: no
switch:
- platform: tplink
host: 192.168.0.xxx
- platform: tplink
host: 192.168.0.xxx
- platform: tplink
host: 192.168.0.xxx
- platform: tplink
host: 192.168.0.xxx
Just out of curiosity, can you place the .py scripts in a directory that you know your HASS user has access to? Like maybe create a scripts directory in your HASS root folder and place the scripts there? I am wondering, if for some reason, if your HASS user cannot access the scripts path?