value_template: '{% set list = value.split( "," ) %} {{ "%0.3f"|format(list[3]|float/1000) }}'
I found that with 3 sensors I exceeded the allowable api calls - 1 was OK - testing with 2 now.
It would be good if the frequency of API calls by the REST sensor was customisable.
fabaff’s new PVOutput Sensor should solve this.
You can easily test this by enabling the sensor as a custom-component. I’m using it right now this way. There are a few details to sort out, but overall it works nice.
Realy great to see PVoutput as a component! I also pv output with the rest platform and hat the issue with too much requests. I tried to used scan_interval:300 but did not work.
I’m just starting with HASS - so how can I enable this sensor as a custom-component?
Is it enough just to add the pvoutput.py to ~/.homeassistant/custon_components/sensor and add
- platform: pvoutput
system_id: 1234
api_key: xyz
scan_interval: 120
Doing this I get:
16-11-07 00:28:07 homeassistant.util.yaml: mapping values are not allowed here
in “/home/pi/.homeassistant/sensor.yaml”, line 161, column 14
Thx,
Daniel
There is one thing that I can’t get to work. The sensor widget shows 'energy_generation) but in my tile it shows unknown. Do I use the wrong name? (using states.sensor.pvoutput.attributes.energy_generation)
Output should have been: 0.31
This is the answer from the PVoutput service: 20161107,23:15,310,NaN,14081,288,NaN,NaN,NaN
Last weekend I followed some tips from @fabaff to use template sensors for splitting up the collected information into readable information. In the end I’d a solution like @Marcel030nl posted above.
For now I’ve two things to sort out:
I can’t get the “Energy Generated” data in my template sensor (same problem as @Marcel030nl)
I’d like to add multiple solar installations to monitor. One possibility is to duplicate the script and use other variables, but thats not the most “robust” solution
I added this line to the custom_sensor pvoutput.py of @fabaff, line 106 ATTR_ENERGY_GENERATION: self.pvcoutput.energy_generation,
(hope this gets merged into the final sensor code)
Based on what I know of the PVoutput API and HASS I would recommend using 2 sensors as well.
I created an app called PVdashboard (pvdashboard.org) based on the PVoutput API. If you want to gather information from an other SID you have to do a new query on the API.