July 20, 20232 yr Author This post was recognized by Energy-Jason! slipx was awarded the badge 'Helpful' and 15 points. 2 hours ago, gkj_muk said: Thank you very much for a great card. I am failing to get my Autarky values to show, I know its something to do with my entities but I cannot figure out which entities, are you able to point me in the correct direction? Hi. What is your Autarky card attribute set to? power or energy? Nan means you are providing input that is not a number? So probably a sensor that is "Unavailable" By default it calculates Autarky and Ratio based on power. It reads the following sensors: totalsolar, battery_power , aux_power , essential, nonessential It requires daily totals to be setup if set to Energy Edited July 20, 20232 yr by slipx
July 21, 20232 yr Sorted!! it was right under my nose! thank you very much, it was the nonessential I was reading an unavailable entity for my non-essential Edited July 21, 20232 yr by gkj_muk
July 22, 20232 yr @slipx May I ask, the Monthly Card ( Card 16 )from your dashboard. Does this card only show Data after a month or will it show data that has accumulated during the month ? All my cards are working but the Monthly Production is showing no info ? Maybe have to wait till the end of the month. Double checked the sensors and they all correct. Would appreciate some advice. Thanks
July 24, 20232 yr Author Hi. Yes you need to wait. At least one month needs to pass before it starts to display data, unless you already have sufficient long term statistics captured for those sensors.
July 24, 20232 yr Thanks @slipx appreciate the reply. Just wanted to make sure that it was not my fault. Thanks How about creating some new awesome cards, Love your work.
July 24, 20232 yr On 2023/07/20 at 6:22 PM, slipx said: Hi. @Muttley No it doesn't work like that. The nonessential load will be supplied from the grid and is not an input to the inverter. Additionally the AUX input not shown on your diagram can be used to feed power i.e. micro-inverter or generator as well ad supply power to a load. Thanks for the feedback and the explanation 😉
July 25, 20232 yr @slipx I would like to add energy cost, could you help and explain, how I add the energy cost? Where do I add currency cost to work out the cost? Thanks
July 26, 20232 yr Author The card makes provision to display the current electricity price if you have a sensor that provides this. e.g. a tibber sensor.
July 29, 20232 yr @slipx Is there a way that I can change the colour of the Generator, different colour from the Load ? I like Aux and Load Icons to be two different colours thanks.
July 29, 20232 yr Author 3 hours ago, Vaughanza said: @slipx Is there a way that I can change the colour of the Generator, different colour from the Load ? I like Aux and Load Icons to be two different colours thanks. I'm sure I can add that for you
July 29, 20232 yr Author v1.9.3 Updates Adds the optional aux_colour attribute to the load card configuration to change the colour of all the AUX objects. If omitted will use the colour set for the load or default load colour if this is not set.
July 30, 20232 yr Hi @slipx Thansk for your efforts here. Top notch card. I'm busy applying the card to my luxpower inverter and trying to match the sensors so would appreciate some assistance with my assumptions below. inverter_voltage_154: load_frequency_192: inverter_current_164: inverter_power_175: Is this what the inverter is sending to the house? inverter_status_59: I'm guessing I need to change the code mappings in your sourcecode to show the correct luxpower statuses? battery_power_190: battery_current_191: grid_power_169: Is this for both in and out, so a discharge current/power must be represented by a negative value? EDIT: Nevermind... I see the docs confirmed this question. day_load_energy_84: kWh consumed by the house for the day? Edited July 30, 20232 yr by Zombie
July 30, 20232 yr Author 3 hours ago, Zombie said: Hi @slipx Thansk for your efforts here. Top notch card. I'm busy applying the card to my luxpower inverter and trying to match the sensors so would appreciate some assistance with my assumptions below. inverter_voltage_154: load_frequency_192: inverter_current_164: inverter_power_175: Is this what the inverter is sending to the house? inverter_status_59: I'm guessing I need to change the code mappings in your sourcecode to show the correct luxpower statuses? battery_power_190: battery_current_191: grid_power_169: Is this for both in and out, so a discharge current/power must be represented by a negative value? EDIT: Nevermind... I see the docs confirmed this question. day_load_energy_84: kWh consumed by the house for the day? Hi Does this help https://github.com/slipx06/sunsynk-power-flow-card/wiki/Example-Card-Configurations#luxpower-tek-inverter If you look at the readme their is a brief description of the different entities. day_load_energy_84 - This is the energy used by the load on the inverter output inverter_voltage_154: - Voltage from inverter measurement point load_frequency_192: - The frequency of the load on the output inverter_current_164: - Current from inverter measurement point inverter_power_175: - Power from inverter measurement point You can supply these with sensors that make the most sense for your setup and what you are interested in seeing. Edited July 30, 20232 yr by slipx
July 30, 20232 yr 1 hour ago, slipx said: Hi Does this help https://github.com/slipx06/sunsynk-power-flow-card/wiki/Example-Card-Configurations#luxpower-tek-inverter If you look at the readme their is a brief description of the different entities. day_load_energy_84 - This is the energy used by the load on the inverter output inverter_voltage_154: - Voltage from inverter measurement point load_frequency_192: - The frequency of the load on the output inverter_current_164: - Current from inverter measurement point inverter_power_175: - Power from inverter measurement point You can supply these with sensors that make the most sense for your setup and what you are interested in seeing. Haibo!!! I'm sure I looked the other day and there was no Luxpower entry. Sorry for wasting your time. PS. Had a quick scan. I don't have have any of those entities. I use the lxpbridge integration. I'll do the mappings and send to you so you can have a copy/paste solution for it. Thanks
July 31, 20232 yr @slipx is there any way that we can create an entity for Autarky? I'd like to be able to view this within my bar-card on my front page of HA and also be able to view this over a date range. (will help convince the Mrs why we need more panels and batteries 🤪)
July 31, 20232 yr 5 hours ago, Muttley said: is there any way that we can create an entity for Autarky? Copied directly from the javaScript. Turning this into an entity should be very easy ``` const stateObj = this.hass.states[config.entities.day_battery_discharge_71] || { state: '0' }; const stateObj1 = this.hass.states[config.entities.day_battery_charge_70] || { state: '0' }; const stateObj2 = this.hass.states[config.entities.day_load_energy_84] || { state: '0' }; const stateObj3 = this.hass.states[config.entities.day_grid_import_76] || { state: '0' }; const stateObj4 = this.hass.states[config.entities.day_pv_energy_108] || { state: '0' }; //Autarky in Percent = Home Production / Home Consumption //Ratio in Percent = Home Consumption / Home Production let production_e = parseFloat(stateObj4.state) + parseFloat(stateObj.state); let consumption_e = parseFloat(stateObj2.state) + parseFloat(stateObj1.state); let Autarky = consumption_e != 0 ? Math.min(Math.round((production_e * 100) / consumption_e), 100) : 0; let Ratio = production_e != 0 ? Math.min(Math.round((consumption_e * 100) / production_e), 100) : 0; ```
July 31, 20232 yr Author Or if you want to use power output to calculate, which provides more real time data and is the default for the card, the formula is let production_p = parseInt(totalsolar) + parseInt(`${battery_power > 0 ? battery_power : 0}`) + parseInt(`${aux_power < 0 ? aux_power * -1 : 0}`); let consumption_p = parseInt(essential) + parseInt(nonessential) + parseInt(`${aux_power > 0 ? aux_power : 0}`) + parseInt(`${battery_power < 0 ? battery_power * -1 : 0}`); let Autarkyp = consumption_p != 0 ? Math.min(Math.round((production_p * 100) / consumption_p), 100) : 0; let Ratiop = production_p != 0 ? Math.min(Math.round((consumption_p * 100) / production_p), 100) : 0;
July 31, 20232 yr Author v1.9.4 Updates You can now provide a sensor for your total solar output. There is a new entities attribute called pv_total: If a sensor is provided it becomes clickable to show historical data. If no sensor is provided the card will continue to use the internal logic to calculate the total pv based on pv1+pv2+pv3+pv4
August 1, 20232 yr 16 hours ago, slipx said: Or if you want to use power output to calculate, which provides more real time data and is the default for the card, the formula is let production_p = parseInt(totalsolar) + parseInt(`${battery_power > 0 ? battery_power : 0}`) + parseInt(`${aux_power < 0 ? aux_power * -1 : 0}`); let consumption_p = parseInt(essential) + parseInt(nonessential) + parseInt(`${aux_power > 0 ? aux_power : 0}`) + parseInt(`${battery_power < 0 ? battery_power * -1 : 0}`); let Autarkyp = consumption_p != 0 ? Math.min(Math.round((production_p * 100) / consumption_p), 100) : 0; let Ratiop = production_p != 0 ? Math.min(Math.round((consumption_p * 100) / production_p), 100) : 0; Thanks - will consult with me good old friend Google for the next steps
August 1, 20232 yr Author Not tested, but a good starting point EDIT updated to handle ?. You'll need another template to limit output between 0 and 100 Limit maximum value to 100 sensor: - platform: template sensors: production_p: friendly_name: "Production Power" unit_of_measurement: "W" value_template: > {% set battery_power = states('sensor.battery_power') | int %} {% set aux_power = states('sensor.aux_power') | int %} {% set prod_solar = states('sensor.totalsolar') | int %} {% set prod_p = prod_solar + (battery_power if battery_power > 0 else 0) + (aux_power * -1 if aux_power < 0 else 0) %} {{ prod_p }} consumption_p: friendly_name: "Consumption Power" unit_of_measurement: "W" value_template: > {% set battery_power = states('sensor.battery_power') | int %} {% set aux_power = states('sensor.aux_power') | int %} {% set cons_essential = states('sensor.essential') | int %} {% set cons_nonessential = states('sensor.nonessential') | int %} {% set cons_p = cons_essential + cons_nonessential + (aux_power if aux_power > 0 else 0) + (battery_power * -1 if battery_power < 0 else 0) %} {{ cons_p }} autarky_p: friendly_name: "Autarky Percentage" unit_of_measurement: "%" value_template: > {% set cons_p = states('sensor.consumption_p') | int %} {% set prod_p = states('sensor.production_p') | int %} {% if cons_p != 0 %} {% set autarky = ((prod_p * 100) / cons_p) %} {% if autarky >= 100 %} {% set autarky = 100 %} {% endif %} {% else %} {% set autarky = 0 %} {% endif %} {{ autarky }} ratio_p: friendly_name: "Production/Consumption Ratio" unit_of_measurement: "%" value_template: > {% set cons_p = states('sensor.consumption_p') | int %} {% set prod_p = states('sensor.production_p') | int %} {% if prod_p != 0 %} {% set ratio = ((cons_p * 100) / prod_p) | round(0) %} {% if ratio >= 100 %} {% set ratio = 100 %} {% else %} {% set ratio = 0 %} {% endif %} {{ ratio }} Edited August 1, 20232 yr by slipx
August 1, 20232 yr Author v1.9.5 Updates Adds a new entities attribute called aux_connected_status: This is similar to the grid_connected_status and accepts a binary sensor to indicate the connection status of the AUX input/output. Valid input is a 1/0 or on/off Adds a new aux_off_colour attribute under the load card configuration to set the colour of the AUX icon and label when disconnected or off
August 9, 20232 yr Guys can someone explain what is Autarky on the power flow card and how it works please ?
August 9, 20232 yr 6 hours ago, Vaughanza said: Guys can someone explain what is Autarky on the power flow card and how it works please ? from the integration github: Quote Autarky is the percentage of self sufficiency through Home Production. Ratio is the percentage of produced electricity used by the home. It is calculated based on the formula below and borrowed from the Power Distribution Card Autarky in Percent = Home Production / Home Consumption Ratio in Percent = Home Consumption / Home Production Edited August 9, 20232 yr by mzezman
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.