Sc00bs Posted October 9, 2021 Share Posted October 9, 2021 Found this power card for Home Assistant, a very neat way of showing what's happening with the power in your solar system. https://github.com/reptilex/tesla-style-solar-power-card Robbo 1 Quote Link to comment Share on other sites More sharing options...
Guest Sarel Posted October 9, 2021 Share Posted October 9, 2021 Are you aware of the energy dashboard build in to HA? My grid is not configured yet, nor my batteries or individual devices. Quote Link to comment Share on other sites More sharing options...
Guest Sarel Posted October 9, 2021 Share Posted October 9, 2021 What makes up my production. Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted October 9, 2021 Author Share Posted October 9, 2021 Hi @Sarel Have looked at the built in one in HA, the Tesla Clone one allows for some added functionality from what I can see. Need to play around with it a bit more Quote Link to comment Share on other sites More sharing options...
kellerza Posted October 10, 2021 Share Posted October 10, 2021 The built in functionality is only for energy usage (kWh). And gives you an idea what happens throughout the day, incl forecasts and where you drew power from (battery/grid/solar) The tesla style power card allows you to show current power distribution (W) So different use cases I prefer the “power distribution card” above the tesla style power card (could never really figure out the math it tries to do with the sensors, and there is a bug with its rendering) Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted October 10, 2021 Author Share Posted October 10, 2021 Thanks @kellerza that makes more sense. So more like the power info on the inverter display. Going to have to spend some time to see if I can get my head around it Quote Link to comment Share on other sites More sharing options...
Tinuva Posted October 11, 2021 Share Posted October 11, 2021 I also prefer the power distribution card. However my favorite card is the apex bar chart I set up to show actual vs forecasted solar production. The above is what is shows now in the morning. Yesterday some time during the day it looked like this: kellerza, Proxicon and Robbo 3 Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted October 11, 2021 Author Share Posted October 11, 2021 @Tinuva That is very cool, could you post the code for it perhaps? Quote Link to comment Share on other sites More sharing options...
Tinuva Posted October 12, 2021 Share Posted October 12, 2021 14 hours ago, Sc00bs said: @Tinuva That is very cool, could you post the code for it perhaps? Sure. First you will need an account with solcast for the forecast. The free account works fine for this, you get 50 api calls I think for free. Once you have an account, set up a site with your panels total kW capacity and the angle they mounted as well as the direction. Mine is 3900w mounted directly north at around 45 degree angle. Once done, grab your site as resource_id and the api key. Then add this to your yaml somewhere (configuration.yaml): Mine is at https://github.com/tinuva/home-assistant-config/blob/master/packages/goodwe_dod.yaml rest: - resource: !secret solcast_forecast_resource #resource: https://api.solcast.com.au/rooftop_sites/RESOURCE_ID/forecasts?format=json&api_key=API_KEY&hours=72 scan_interval: '00:30:00' # RATE LIMIT! sensor: - name: "Solcast Forecast Data" force_update: true value_template: "{{ value_json.forecasts[0].pv_estimate|round(2) }}" json_attributes: - forecasts - name: "Solcast Forecast 10" force_update: true value_template: "{{ value_json.forecasts[0].pv_estimate10|round(2) }}" - name: "Solcast Forecast 90" force_update: true value_template: "{{ value_json.forecasts[0].pv_estimate90|round(2) }}" Then in the the UI, create a card with the following yaml code to get the graph. Replace the sensor.goodwe_ppv with your own actual solar/pv sensor. type: custom:apexcharts-card graph_span: 36h span: start: day offset: '-6h' header: show: true title: Solar Production vs. forecast show_states: true now: show: true label: now apex_config: legend: show: true series: - entity: sensor.goodwe_ppv stroke_width: 2 show: extremas: false color: '#FFF700' name: Actual unit: W fill_raw: last extend_to_end: false group_by: func: avg duration: 30min - entity: sensor.solcast_forecast_data stroke_width: 2 show: extremas: false color: '#3498DB' transform: return x * 1000; name: Forecast History unit: W fill_raw: last extend_to_end: false - entity: sensor.solcast_forecast_10 stroke_width: 2 show: extremas: false in_header: false color: '#797D7F' transform: return x * 1000; name: Forecast 10 History unit: W fill_raw: last extend_to_end: false opacity: 0.4 - entity: sensor.solcast_forecast_90 stroke_width: 2 show: extremas: false in_header: false color: '#797D7F' transform: return x * 1000; name: Forecast 90 History unit: W fill_raw: last extend_to_end: false opacity: 0.4 - entity: sensor.solcast_forecast_data stroke_width: 2 show: extremas: false in_header: false color: '#E74C3C' name: Forecast type: line extend_to_end: false unit: W data_generator: | return entity.attributes.forecasts.map((entry) => { return [new Date(entry.period_end), entry.pv_estimate*1000]; }); - entity: sensor.solcast_forecast_data stroke_width: 2 show: extremas: false in_header: false color: '#797D7F' name: Forecast 10 type: line extend_to_end: false unit: W opacity: 0.4 data_generator: | return entity.attributes.forecasts.map((entry) => { return [new Date(entry.period_end), entry.pv_estimate10*1000]; }); - entity: sensor.solcast_forecast_data stroke_width: 2 show: extremas: false in_header: false color: '#797D7F' name: Forecast 90 type: line extend_to_end: false unit: W opacity: 0.4 data_generator: | return entity.attributes.forecasts.map((entry) => { return [new Date(entry.period_end), entry.pv_estimate90*1000]; }); All of this is based on testing and ideas from https://community.home-assistant.io/t/rest-api-command-platform-fails-on-post-to-external-url-solcast/143238/141 Proxicon, Desh and Robbo 1 2 Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted October 12, 2021 Author Share Posted October 12, 2021 Thank you for sharing the graph @Tinuva I actually use the solar forecast so as to decide whether to switch my pool pump on or not with Node Red. I haven't been using it to forecast the actual production number as my batteries are usually full by 12:00 so I have quite a lot of solar power I don't use in summer, but rather just to give me an indication as to how much solar radiation we will have available for the day. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.