rfdmota
(Ricardo F. Mota)
May 1, 2018, 4:59pm
21
yes I have that:
my configuration.yaml
shell_command: !include shell_commands.yaml
automation: !include_dir_merge_list automations/
and the shell_commands.yaml
shell_command:
getcurrentcost: python3 /home/homeassistant/.homeassistant/python_scripts/CurrentCost.py
rfdmota
(Ricardo F. Mota)
May 1, 2018, 5:08pm
22
I changed the configuration.yaml:
shell_command:
getcurrentcost: /home/homeassistant/.homeassistant/python_scripts/CurrentCost.py
(this is inside the configuration.yaml) and now it shows correctly:
If I run it from terminal it works:
or
hijinx
(James)
May 1, 2018, 5:25pm
23
I’m a bit late to this thread but I wanted to let you know that I had good success receiving currentcost RF signals with a dvb receiver and rtl433. I built a hassio addon that supports this.
I’ve just updated my repo to include an add-on that uses rtl_433 to provide a 433MHz RF to MQTT bridge.
This allows use of a cheap USB DVB-T tuner (based on RTL chipset) to be re-purposed as a software defined radio … in this case specifically to sniff and decode 433MHz signals.
Currently 93 protocols are supported.
Addon details here:
rtl_433 details, including supported protocol list here:
Note that the addon requires a subdirectory to be created in your hassio config dir that will …
3 Likes
petro
(Petro)
May 1, 2018, 6:18pm
24
If you want to keep it with the ‘include!’, you need to do this:
configuration.yaml:
shell_command: !include shell_commands.yaml
shell_commands.yaml:
getcurrentcost: python3 /home/homeassistant/.homeassistant/python_scripts/CurrentCost.py
Notice the 2 spaces before getcurrentcost. The section header is already included in the configuration.yaml and it isn’t needed in the shell_commands.yaml file.
rfdmota
(Ricardo F. Mota)
May 1, 2018, 6:32pm
25
it works with that config, but does’t start the python script …
petro
(Petro)
May 2, 2018, 11:45am
26
That may be a permissions thing and it’s outside my realm of expertise. You may want to make a new post or search the forums for similar issues.
rfdmota
(Ricardo F. Mota)
May 2, 2018, 1:20pm
27
Thank you Petro for all the help!
1 Like
Here you can see how I integrated it using an script in Python to influxdb, and influxdb sensor: https://www.solutioon.com/consumo-electrico-en-home-assistant-con-current-cost-envir/
lolouk44
(lolouk44)
March 11, 2020, 8:20pm
29
If anyone is interested, I’ve created a custom component for CurrentCost:
This is my 2nd “Share your Projects” on this topic. I finally created a component for this.
It’s currently a custom component, but I’m hoping to get it converted into a native HA component once I’ve learnt all the PR and Test tricks.
Anyway, for those interested, you can find my custom component on my repo here:
Feedback welcome