├── ConfigTab.png ├── DeyeTab.png ├── EmptyDesktop.png ├── GraphsTab1.png ├── GraphsTab2.png ├── Import_Export.md ├── InstallHomeAssistant.md ├── InverterValuesTab.png ├── JustGrabbingSomeIdeas.md ├── LICENSE ├── OctopusFlux_Setup.md ├── Prepaid_electricity_meter.md ├── README.md ├── SmartDeyeDongle-Base.stl ├── SmartDeyeDongle-Lid.stl ├── SmartDeyeDongle.jpg ├── SmartDeyeDongle.md ├── StandardEnergyDashboard.png ├── TELEGRAM_SETUP.md ├── TimeOfUseTab1.png ├── TimeOfUseTab2.png ├── automations.yaml ├── configuration.yaml ├── module.jpg ├── packages ├── essentials_automation.yaml ├── nordpool_automation.yaml ├── nordpool_dashboard.yaml ├── nordpoool.yaml ├── octopusflux.yaml ├── octopusflux_automations.yaml ├── octopusflux_dashboard_importexport.yaml ├── polish_tge.yaml ├── polish_tge_automations.yaml ├── polish_tge_dashboard.yaml ├── prepaidmeter.yaml ├── prepaidmeter_automations.yaml ├── prepaidmeter_dashboard.yaml ├── smartdeyedongle.yaml ├── smartdeyedongle_automations.yaml ├── smartdeyedongle_master_slave.yaml ├── smartdeyedongle_master_slave_slavec.yaml ├── solarDesktop_solcastForecast.yaml ├── telegram.yaml └── telegram_automation.yaml ├── solarDesktop.yaml ├── solarDesktopPowerFlow.yaml ├── solarDesktop_3PhaseMaster.yaml ├── solarDesktop_MasterSlaveCombined.yaml ├── solarDesktop_MasterSlave_Master.yaml ├── solarDesktop_MasterSlave_Slave.yaml ├── solarDesktop_MasterSlave_SlaveC.yaml ├── template.yaml ├── template_3Phase.yaml └── template_MasterSlave_System.yaml /ConfigTab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/ConfigTab.png -------------------------------------------------------------------------------- /DeyeTab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/DeyeTab.png -------------------------------------------------------------------------------- /EmptyDesktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/EmptyDesktop.png -------------------------------------------------------------------------------- /GraphsTab1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/GraphsTab1.png -------------------------------------------------------------------------------- /GraphsTab2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/GraphsTab2.png -------------------------------------------------------------------------------- /Import_Export.md: -------------------------------------------------------------------------------- 1 | A Simple dashboard use cheap grid power during winter days (Built for European customers) 2 | 3 | Enable your inverter to fill the battery during the cheapest hours 4 | Run from the battery power during the expensive hours 5 | 6 | Be sure to setup a packages folder in your Home Assistant config folder and include this reference in your [configuration.yaml](./configuration.yaml) 7 | To learn how to setup dashboards/automations/config please look at the installation section on my octupus flux video (forward to the install section) 8 | You will also need to install the HACS component to supply the rates for your country. TODO: Include links for each country 9 | 10 | Steps all relevant to the country sections below: 11 | 1. Create Empty Dashboard and do a raw copy of the relevant dashboard (described in the youtube video) 12 | 2. copy the configiration file contents to the packages folder with a yaml extension 13 | 3. copy the contents of the automations to your automations.yaml making sure to keep the indentation the same 14 | 4. Install the energy provider HACS component supplying the rates for your country 15 | 5. Developer Tools >> Check the config. If all good restart you home assistant. 16 | 17 | For Countries using Nordpool as energy provider (built using country LT) 18 | * Dashboard [Norpool Dashboard](./packages/nordpool_dashboard.yaml) 19 | * Nordpool configuration in packages folder [packages/nordpoool.yaml](./packages/nordpoool.yaml) 20 | * Automations [automations.yaml](./packages/nordpool_automation.yaml) 21 | 22 | Poland using TSE Rates 23 | * Dashboard [Polish Dashboard](./packages/polish_tge_dashboard.yaml) 24 | * TGE configuration in packages folder [packages/polish_tge.yaml](./packages/polish_tge.yaml) 25 | * Automations [automations.yaml](./packages/polish_tge_automations.yaml) 26 | 27 | (my home server had a disk failure so my test HA is currently offline. As soon as I can get it replaced I will test the files I have) 28 | Netherlands using Tiber (coming soon) 29 | * Dashboard 30 | * Configuration 31 | * Automations 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /InstallHomeAssistant.md: -------------------------------------------------------------------------------- 1 | There are many ways to install home assistant. 2 | If you are new to Home Assistant stick to the Home Assistant OS. (You will thank me later) 3 | This is my favourite method as I mainly install on old laptops/desktops/mini pc (The processor can be fairly old but must support 64bit). Uefi boot would be nice but not strictly required (instructions below to boot with grub) 4 | 5 | Write a bootable USB disk with Ventoy (usb boot utility) and the Latest Manjaro ISO. Other tools work just as well. 6 | Plug in the network card (we need the network and home assistant needs a wired connection) 7 | Plug the USB into the latop and on boot press F10. F11, F12 or F2 (whatever needed to get the boot menu to show) 8 | 9 | Now boot from Ventoy into Manjaro command line 10 | ``` 11 | systemclt start sshd 12 | ip addr 13 | >>> Now look for the ip address, you are done working on this machine 14 | ``` 15 | 16 | From your desktop 17 | ``` 18 | ssh manjaro@192.168.4.1 #replace the ip with the one shown 19 | empty password 20 | sudo -i 21 | wget https://github.com/home-assistant/operating-system/releases/download/10.3/haos_generic-x86-64-10.3.img.xz #replace with the latest version or architecture you need to install 22 | # assume /dev/sda is the hard drive of your home assistant 23 | xzcat haos_generic-x86-64-10.3.img.xz | dd of=/dev/sda bs=1m 24 | ``` 25 | If your machine supports UEFI you can reboot and it should boot 26 | If UEFI is not supported then load grub below 27 | 28 | ``` 29 | # assume /dev/sda is the hard drive of your home assistant 30 | mount /dev/sda1 /mnt #this is the EFI boot partition 31 | grub-install --boot-directory=/mnt/boot --force /dev/sda 32 | 33 | ``` 34 | Then just create a /mnt/boot/grub/grub.cfg with the following content: 35 | 36 | ``` 37 | set root=(hd0,gpt1) 38 | configfile (hd0,gpt1)/efi/boot/grub.cfg 39 | ``` 40 | Now you are done and ready to reboot into Home Assistant 41 | ``` 42 | reboot 43 | ``` 44 | Take bootable USB out 45 | Your home assistant server should boot 46 | -------------------------------------------------------------------------------- /InverterValuesTab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/InverterValuesTab.png -------------------------------------------------------------------------------- /JustGrabbingSomeIdeas.md: -------------------------------------------------------------------------------- 1 | # How to copy this desktop to your existing Home Assistant 2 | * This is for people that bought the [SmartDeyeDongle](./SmartDeyeDongle.yaml) with an exsting home assistant server. 3 | * This is for anyone with anyone looking to copy some bits and pieces of this desktop for their own solar setup 4 | 5 | ## Consult this youtube video I made (especially if you are new to home assistant) 6 | [![Watch the video](https://img.youtube.com/vi/Cqktgvu0ob0/0.jpg)](https://www.youtube.com/watch?v=Cqktgvu0ob0) 7 | 8 | ## UI Layout and Display 9 | Please consult the yaml file [solarDesktop.yaml](./solarDesktop.yaml) that contains all the UI tabs provided in the screenshots, you could just create a new empty desktop and copy the whole contents. 10 | If you have a master/slave setup then there are 3 dashboards to install 11 | * [solarDesktop_MasterSlaveCombined.yaml](./solarDesktop_MasterSlaveCombined.yaml) 12 | * [solarDesktop_MasterSlave_Master.yaml](./solarDesktop_MasterSlave_Master.yaml) 13 | * [solarDesktop_MasterSlave_Slave.yaml](./solarDesktop_MasterSlave_Slave.yaml) 14 | 15 | ## Integrations needed: 16 | * Terminal server 17 | * Studio code server 18 | * [HACS download] (https://hacs.xyz/docs/setup/download/) 19 | * ha-eskom-loadshedding (https://github.com/wernerhp/ha.integration.load_shedding) or also (https://github.com/swartjean/ha-eskom-loadshedding) You will need to register on sepush (https://eskomsepush.gumroad.com/l/api) for a free account if you are not a business 20 | 21 | ## HACS Plugins that you will need: 22 | * Mushroom 23 | * slider-entity-row 24 | * layout-card 25 | * Flexible Horseshoe Card 26 | * Plotly Graph Card 27 | * ApexCharts 28 | * Atomic Calendar Revive 29 | * Sunsynk-Power-Flow-Card (Note that this is now available in HACS, the video shows it still as a custom plugin to be manually added, install is now similar to the others) 30 | 31 | ## Config files 32 | Note that the files described in the video will still work they were left to ensure you can get a working version. 33 | Configuration.yaml needed [configuration.yaml](./configuration.yaml) 34 | 35 | Future: The preferred way for newer videos would be to place certain config in the packages folder. 36 | You need the lines "homeassistant: packages: !include_dir_named packages" 37 | from [configuration.yaml](./configuration.yaml) 38 | 39 | and also copy the [template.yaml](./template.yaml) 40 | master/slave use [template_MasterSlave_System.yaml](./template_MasterSlave_System.yaml) 41 | Future: The templates will be moving to the packages folder [packages/smartdeyedongle.yaml](./packages/smartdeyedongle.yaml) 42 | 43 | If you plan to use Telegram then also install [packages/telegram.yaml](./packages/telegram.yaml) 44 | 45 | # Automations: 46 | Still here [automations.yaml](./automations.yaml) 47 | Future: Automation files placed in the packages folder are not editable via the GUI [smartdeyedongle_automations.yaml](./packages/smartdeyedongle_automations.yaml) You should copy the content to your automations.yaml file. 48 | 49 | 50 | Automations: Needed for the time of use configuration (that will copy the values from the inverter to dateTime objects(in home assistant), and when the user edits the time, it will convert the time to the format the inverter expects and update the inverter values via the smartDeyeDongle 51 | 52 | Look out for this automation: 53 | 1. InverterConfig Update Times 54 | 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /OctopusFlux_Setup.md: -------------------------------------------------------------------------------- 1 | This is the guide to setup your own octopus Flux Dashbord for import/Export 2 | ============================================================================= 3 | - complete with automations 4 | - charges the battery 02:00 - 05:00 (configurable) 5 | - discharges the battery 16:00 - 19:00 (configurable) 6 | - auto-Calculating both the charge rate and discharge rate to ensure that we do not use more current than needed (full code available in the yaml files) 7 | 8 | ## This Guide goes along with a Youtube video 9 | [![Watch the video](https://img.youtube.com/vi/IktkBl3inTA/0.jpg)](https://www.youtube.com/watch?v=IktkBl3inTA) 10 | 11 | ## You will need: 12 | 1. Deye/Sunsunk hybrid inverter 13 | 2. Home Assistant Server 14 | 3. [SmartDeyeDongle](./SmartDeyeDongle.md) + Dashboard setup (It relies some of the other components) 15 | 4. The right plan from Octopus energy 16 | You can support me by signing up with Octopus using my UK friend's Octopus referal code 17 | [https://share.octopus.energy/witty-ibis-586] 18 | 19 | ## Step 1: Backup your configuration before you start, Full Backup + download it locally 20 | 21 | ## HACS Plugins Needed: 22 | 1. All the plugins from the Standard Dashboard [JustGrabbingSomeIdeas.md](./JustGrabbingSomeIdeas.md) 23 | 2. Solcast PV Solar 24 | 3. Octopus Energy 25 | 26 | Note that both of these require you to register for API Keys. 27 | 1. Solcast has a free plan. 28 | 2. Octopus energy you need the API Key and Account ID 29 | 30 | ## Steps: 31 | 1. Install the Dashboard [octopusflux_dashboard_importexport.yaml](./packages/octopusflux_dashboard_importexport.yaml) Create empty dashboard and do raw copy. 32 | 2. Create the packages folder and copy the octopusflux.yaml file to packages [octopusflux.yaml](./packages/octopusflux.yaml) 33 | 3. Copy the contents of the octopusflux_automations.yaml to your automations.yaml file [octopusflux_automations.yaml](./packages/octopusflux_automations.yaml) 34 | 4. Copy the lines from configuration.yaml "homeassistant: packages: !include_dir_named packages" to your configuration.yaml 35 | [configuration.yaml](./configuration.yaml) 36 | 5. Restart Home Assistant, make sure the configuration Changes are good before restarting 37 | 38 | ## Final Configuration: 39 | - Disable all octopus flux automations while we setup the items below 40 | - Setup your Inverter with the config items 41 | - Times for TimeZone1 (2:00 - 5:00) 42 | - Times for TimeZone4 (16:00 - 19:00) 43 | - Setup your desired State of Charge in TimeZone 1 for Charging 44 | - Setup your desired State of Charge in TimeZone 4 for Discharging 45 | - Setup a desired reserve percentage for discharging 46 | - When everything is ready then enable the automations again. Be sure to monitor it closely 47 | - Fix the dashboard graphs to point to your own octopus meter numbers 48 | -------------------------------------------------------------------------------- /Prepaid_electricity_meter.md: -------------------------------------------------------------------------------- 1 | ## Some notes to integrate the prepaid meter: 2 | 3 | ## This Guide goes along with a Youtube video (TODO, still need to make a video) 4 | (the install should be similar to some of my other videos, if you are lost please look at the octupus flux video)[OctopusFlux_Setup.md](./OctopusFlux_Setup.md) Specifically the section to install the dashboard,automations and file in packages. 5 | 6 | This config stores the config files in "packages", if you do not have this in config your need to manually create it 7 | 8 | ## Steps: 9 | 1. Install the Dashboard [prepaidmeter_dashboard.yaml](./packages/prepaidmeter_dashboard.yaml) Create empty dashboard and do raw copy. 10 | 2. Create the packages folder and copy the prepaidmeter.yaml file to packages [prepaidmeter.yaml](./packages/prepaidmeter.yaml) 11 | 3. Copy the contents of the prepaidmeter_automations.yaml to your automations.yaml file [prepaidmeter_automations.yaml](./packages/prepaidmeter_automations.yaml) 12 | 4. Copy the lines from configuration.yaml "homeassistant: packages: !include_dir_named packages" to your configuration.yaml [configuration.yaml](./configuration.yaml) 13 | 5. Restart Home Assistant, make sure the configuration Changes are good before restarting 14 | 6. Look at your prepaid meter and enter the amount of units shown on "Prepaid meter Recharge Units" 15 | 7. Add notifications via Telegram to notify yourself when your prepaid electricity is nearly depleted 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DeyeSolarDesktop 2 | 3 | Let's get your desktop up and running, once entities are populating with data it will look like this: 4 | 5 | New! : Dashboard 4.5 now available see Youtube Video below for a preview. (Firmware 4.6 is fully compatible with this dashboard) 6 | 7 | [![Watch the video](https://img.youtube.com/vi/djIpEzQoppA/0.jpg)](https://www.youtube.com/watch?v=djIpEzQoppA) 8 | 9 | If you are new to home assistant then the DeyeSolarDesktop is a quick and sure way to get your solar monitoring desktop up and running within minutes. 10 | 11 | This desktop was built to provide a plug and play integration with the smartDeyeDongle which can be purchased seperately ~~(available towards end of June 2023)~~ Now available [SmartDeyeDongle](./SmartDeyeDongle.md) 12 | 13 | Compatible hardware: This desktop was built for Deye inverters (which includes all the rebranded inverters Sunsynk/Sol-Ark/Magneeto etc). There is no reason why you could not use some parts of the desktop and integrations for another inverter as many entities are similar between inverters. 14 | 15 | Steps: 16 | 17 | 1. Install your own Home Assistant server (you need an old PC/rasp pi/VM om your PC) It is opensource and free software [https://www.home-assistant.io/installation/] [Quick guide](./InstallHomeAssistant.md) 18 | 2. [JustGrabbingSomeIdeas](./JustGrabbingSomeIdeas.md) Follow this guide to install the Dashboard onto your existing Home Assistant Install 19 | 3. This is what the empty desktop looks like before any solar data is populated from the inverter. 20 | ![image](./EmptyDesktop.png) 21 | 4. Consult this youtube video I made describing the steps to install you SmartDeyeDongle 22 | [![Watch the video](https://img.youtube.com/vi/sfhMm31nhoE/0.jpg)](https://www.youtube.com/watch?v=sfhMm31nhoE) 23 | 24 | * Plug in your smartDeyeDongle, connect to the wifi hot-spot it provides and configure your wifi network details, once saved it will reboot and join your wifi network. 25 | * Home Assistant will detect a new device called "DeyeInverterMaster", click "configure" and input the decryption key provided with your purchase. Your desktop will start recording data (Some parts like eg. graphs will only populate once there is enough data which might take Days/Weeks) 26 | * Modify and delete what does not suit you, it is your desktop after all. Feel free to suggest improvements and fix any wrong values. 27 | * Look at the various automations documented. Issues commonly reported by other users of this inverter can be fixed by various automations. Someone has already suggested the solution to your problem. 28 | * Be sure to report any issues you find. Now optimise your power usage towards a more sustainable future and share your breakthroughs to help other people. 29 | 30 | ### Fetching Data 31 | Getting the Data from your inverter 32 | * You can order your [SmartDeyeDongle](./SmartDeyeDongle.md), it plugs into your inverter and translates all the data to home assistant directly, you can expect real time data updated every 3-4s and the ability to change settings via the screen or automations. 33 | 34 | 35 | ### Automations and integrations to note 36 | 37 | * Prepaid Electricty Meter [Prepaid_electricity_meter.md](./Prepaid_electricity_meter.md) 38 | A basic dashboard to capture the current prepaid meter units remaining. It records the total grid usage of the inverter when entering the "prepaid meter units remaining" (with an automation). There is an entity that counts down the amount of units remaining. Add telegram notifications to get notified when you have X amount of units left. 39 | 40 | * Octopus flux [OctopusFlux_Setup.md](./OctopusFlux_Setup.md) 41 | A complete dashboard and automation to export to the grid during peak hours and charge during cheap hours. Sit back while your inverter buys and sells power 42 | 43 | * Import/Export Dashboard [Import/Export](./Import_Export.md) 44 | Automate your Deye inverter to charge the battery using the cheapest hours on the tariff for your country (for European countries with very little winter sun). 45 | 46 | * Telegram integration with notifications about power outages: 47 | see [TELEGRAM_SETUP Guide](./TELEGRAM_SETUP.md) 48 | 49 | * A nice full screen dashboard with the powerflow (ideal for tablet display on a wall) 50 | use [solarDesktopPowerFlow.yaml](./solarDesktopPowerFlow.yaml) 51 | 52 | * New automation added: 53 | Inverter: Switch to Export essentials/Non-Essentials when sun sets/rises 54 | Automation is not installed by default [packages/essentials_automation.yaml](./packages/essentials_automation.yaml) 55 | This stops the export to non-essentials from the battery when the sun is not shining, but during the day solar power is sent to non-essentials 56 | 57 | ### Why this project: 58 | I believe that knowledge is power. Once you understand your power usage you will be able to optimise it. We are rapidly moving towards a future where there is a need to have a smart home with smart power usage. Since the platform allows automations that is the next logical step towards a greener future. If this project can enable every house to save just 5% of power sourced from dirty generation (such as coal) and replace it with power from panels already installed we have achieved our goal. Now if that saves the user money that can be seen as a bonus. Helping people to move towards a sustainable future 59 | -------------------------------------------------------------------------------- /SmartDeyeDongle-Base.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/SmartDeyeDongle-Base.stl -------------------------------------------------------------------------------- /SmartDeyeDongle-Lid.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/SmartDeyeDongle-Lid.stl -------------------------------------------------------------------------------- /SmartDeyeDongle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/SmartDeyeDongle.jpg -------------------------------------------------------------------------------- /SmartDeyeDongle.md: -------------------------------------------------------------------------------- 1 | The SmartDeyeDongle contains all the decoding logic for the inverter and will give you a seamless integration into Home Assistant and the DeyeSolarDesktop 2 | 3 | The new SmartDeyeDongle V4 has passed tests. 4 | ![image](./SmartDeyeDongle.jpg) 5 | 6 | 7 | ### What you need to have already: 8 | * You need to be running a single/split phase Deye/Sunsynk hybrid inverter (Master & Slave also supported). 9 | * 3Phase Low Voltage is now suported. (Master & Slave also supported) 10 | * 3Phase High Voltage is also supported. (Master & Slave also supported) 11 | * String inverters and micro inverters are not currently supported 12 | 13 | ### Models supported 14 | * Single/Split phase Low Voltage (40-60V Battery) 16kW/15kW/14kW/12kW/10kW/8kW/6kW/5kW/3.6kW/3kW 15 | * 3 Phase Low Voltage (40-60V Battery) 20kW/18kW/16kW/15kW/14kW/12kW/10kW/8kW/6kW/5kW/4kW/3kW 16 | * 3 Phase High Voltage (200-800V Battery) 80kW/75kW/70kW/60kW/50kW/40kW/35kW/30kW/25kW/20kW/15kW/12kW/10kW/8kW/6kW/5kW 17 | 18 | * You need to run your own home assistant (https://www.home-assistant.io/installation/) on an old PC/VM/Laptop/Rasp Pi or similar must support 64bit. 19 | * You need to have a 2.4GHz wifi network at the inverter with reasonable network coverage. 20 | 21 | #### Not included (must supply your own): 22 | Either 23 | * You need to have an old micro-USB (type B) phone charger to supply power, even if it is a slo-o-o-ow charger, 500mA it is fine. These are still common even today for most electronic devices 24 | OR Alternatively 25 | * The SmartDeyeDongle V4 also supports input from 5V-16V so we can actually power it directly from the inverter 12V power supply (pin 11&12 on my 8kW marked as RST, consult your inverter documentation) **Note that the 3.6/5/6kW does not have this output. Use a an old phone charger with micro-USB 26 | 27 | ### Cost 28 | I have an online store at https://smarthomeintegrations.co.za where you can order the SmartDeyeDongle. My contact details are on the website if you need to contact me. 29 | 30 | Shipping R100 via The Courier Guy (3-4 business days economy, but most of the times they deliver the next day) 31 | I added a few international options, I can ship limited numbers and items (for now only the Dongle & ESP32) 32 | My website now includes an online flasher to allow anyone to purchase and flash the firmware. 33 | This will open up up possibilities for international sales. 34 | 35 | 36 | ### 3D printed designs 37 | The Official 3D Print design is available for sale on the website. Designed by an Engineering student to help pay for his university tuituion. 38 | 39 | Thanks to mrfrikkie on carbonite these designs were shared for free. They might need some tweaking to get them perfect 40 | [Base stl](./SmartDeyeDongle-Base.stl) 41 | [Lid stl](./SmartDeyeDongle-Lid.stl) 42 | -------------------------------------------------------------------------------- /StandardEnergyDashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/StandardEnergyDashboard.png -------------------------------------------------------------------------------- /TELEGRAM_SETUP.md: -------------------------------------------------------------------------------- 1 | Boilerplate config and automations to integrate into your own Telegram bot. 2 | 3 | If you restored this desktop from a backup all the configuration should be in the config files 4 | 5 | You only need to register your own bot on Telegram and give the bot additional permissions to see your messages. 6 | Then supply the api KEY in the config file 7 | in [https://github.com/tomatensaus/DeyeSolarDesktop/configuration.yaml] 8 | Input your bot's api key under "api_key" as supplied by the "BotFather_BOT" 9 | Restart home assistant: 10 | Now /start your bot and send it a some text, we will see the automation will log this event. 11 | 12 | Home Assistant > Settings > Automations & Scenes > "Telegram debug automation to see chatIDs" 13 | Right top corner click traces 14 | Click the first cicle > Click "Changed variables" and look for: 15 | ``` 16 | trigger: 17 | id: Unknown 18 | idx: '10' 19 | alias: null 20 | platform: event 21 | event: 22 | event_type: telegram_text 23 | data: 24 | id: 4196 25 | chat_id: 123456789 #This be your chat_ID, also works for group so copy these to your config file 26 | ``` 27 | Then fill this in on [https://github.com/tomatensaus/DeyeSolarDesktop/configuration.yaml] 28 | The under "allowed_chat_ids" 29 | and "chat_id" 30 | repeat the process for your groups is so desired 31 | restart home assistant again to make it aware of the "allowed_chat_ids" that it may respond to 32 | 33 | If everything works the automation [https://github.com/tomatensaus/DeyeSolarDesktop/automation.yaml] 34 | "Telegram debug automation to see chatIDs" also looks for the text "command1" to which it will respond 35 | "command1 was understood and I will action it now", you can add another action that could switch on your hot water geyser, turn off lights etc. This was added as a simple "command" that you can expand on your own to your needs 36 | 37 | 38 | Message notifications of a power outage/loadshedding to warn you and report the battery SOC: 39 | [https://github.com/tomatensaus/DeyeSolarDesktop/automation.yaml] 40 | "Telegram Loadshedding annoucement" when the grid frequency drops below 48Hz then send a telegram that the grid is down and report the batter state of charge. Similarly when the grid returns then notify over telegram 41 | Example message :"Loadshedding started with battery SOC: 98%" 42 | 43 | Note: 44 | ``` 45 | - service: telegram_bot.send_message 46 | data: 47 | message: 'Loadshedding finished with battery SOC: {{states("sensor.deyeinverter_battery_soc")}}%' 48 | target: -12333321 49 | ``` 50 | the target should be the group id where you want the message to be sent to 51 | 52 | 53 | This is the walkthrough to get your bot talking to your home assistant server 54 | ============================================================================= 55 | ``` 56 | On Telegram search for the Botfather bot 57 | /start 58 | /newbot 59 | select a name for your bot 60 | select username for your bot, this needs to be unique 61 | You will get the API key for your bot 62 | copy paste this into configuration.yaml 63 | /mybots 64 | Select settings 65 | Select Group privacy 66 | Disable privacy mode 67 | I am not strictly sure you need to give all admin rights to your bot but this is what I did 68 | Group Admin rights 69 | Add all the rights 70 | Channel Admin rights 71 | Add all the rights 72 | ``` 73 | Restart Home Assistant 74 | ``` 75 | click on the link that telegram provided for your bot t.me/mybot_link 76 | /start 77 | type a message for the bot 78 | Now look in Home Assistant --> settings->System->logs 79 | You should see an error message to say that 80 | "Unauthorized update - neither user id #yourChatID nor chat id #anotherId is in allowed chats: 81 | copy your chatID into configuration.yaml, there are 2 places I documented where it should be placed 82 | ``` 83 | Restart Home Assistant 84 | ``` 85 | send your bot any message 86 | Home asssitant will also reply on this message and tell you what chat ID sent it a message 87 | Go to automation "Telegram debug automation to see chatIDs" and look at the debug traces, this is the automation that replied to your message 88 | 89 | I got a message from chatID:#yourChatID 90 | Now your home assistant can talk to you and you can give it commands 91 | 92 | Personally I like to add a group that I can easily add multiple people or remove them 93 | On Telegram, Add group, be sure to add yourself and also the bot 94 | send a message on the group... your bot will send you a private message: 95 | I got a message from chatID:#yourChatID this is the group chatID, copy this to the configuration.yaml under the place documented for the group 96 | ``` 97 | Restart Home Assistant 98 | 99 | Go to your automations about the loadshedding and update the chatID so messages can go to your group by default, the hardcode id is not valid. The next loadshedding your home assistant service will let you know via telegram what the state of the grid is and also the battery charge 100 | 101 | You can also send your bot/group a command. I have added the command1 as an example. I use it to remotely tell me what temperature my water heater is at, I can also trigger the heating of water. 102 | 103 | Now it is up to you to expand this into something useful that serves your purpose. 104 | -------------------------------------------------------------------------------- /TimeOfUseTab1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/TimeOfUseTab1.png -------------------------------------------------------------------------------- /TimeOfUseTab2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/TimeOfUseTab2.png -------------------------------------------------------------------------------- /automations.yaml: -------------------------------------------------------------------------------- 1 | - id: "1680707528756" 2 | alias: InverterConfig Update Times 3 | description: Automation fetches TimeOfUse values and updates HA/Inverter 4 | triggers: 5 | - trigger: state 6 | entity_id: 7 | - number.deyeinvertermaster_timezone1_time 8 | - number.deyeinvertermaster_timezone2_time 9 | - number.deyeinvertermaster_timezone3_time 10 | - number.deyeinvertermaster_timezone4_time 11 | - number.deyeinvertermaster_timezone5_time 12 | - number.deyeinvertermaster_timezone6_time 13 | id: sendUpdatetoHATimeObjects 14 | - trigger: state 15 | entity_id: 16 | - input_datetime.timezone1_time 17 | - input_datetime.timezone2_time 18 | - input_datetime.timezone3_time 19 | - input_datetime.timezone4_time 20 | - input_datetime.timezone5_time 21 | - input_datetime.timezone6_time 22 | id: SendUpdateToInverter 23 | condition: 24 | - condition: template 25 | value_template: "{{ trigger.to_state.state != 'unavailable' }}" 26 | actions: 27 | - delay: 28 | hours: 0 29 | minutes: 0 30 | seconds: 2 31 | milliseconds: 0 32 | - choose: 33 | - conditions: 34 | - condition: trigger 35 | id: 36 | - SendUpdateToInverter 37 | sequence: 38 | - action: number.set_value 39 | target: 40 | entity_id: number.deyeinvertermaster_timezone1_time 41 | data: 42 | value: 43 | '{{state_attr(''input_datetime.timezone1_time'', ''timestamp'') | 44 | timestamp_custom("%H%M", false) | float}}' 45 | - action: number.set_value 46 | target: 47 | entity_id: number.deyeinvertermaster_timezone2_time 48 | data: 49 | value: 50 | '{{state_attr(''input_datetime.timezone2_time'', ''timestamp'') | 51 | timestamp_custom("%H%M", false) | float}}' 52 | - action: number.set_value 53 | target: 54 | entity_id: number.deyeinvertermaster_timezone3_time 55 | data: 56 | value: 57 | '{{state_attr(''input_datetime.timezone3_time'', ''timestamp'') | 58 | timestamp_custom("%H%M", false) | float}}' 59 | - action: number.set_value 60 | target: 61 | entity_id: number.deyeinvertermaster_timezone4_time 62 | data: 63 | value: 64 | '{{state_attr(''input_datetime.timezone4_time'', ''timestamp'') | 65 | timestamp_custom("%H%M", false) | float}}' 66 | - action: number.set_value 67 | target: 68 | entity_id: number.deyeinvertermaster_timezone5_time 69 | data: 70 | value: 71 | '{{state_attr(''input_datetime.timezone5_time'', ''timestamp'') | 72 | timestamp_custom("%H%M", false) | float}}' 73 | - action: number.set_value 74 | target: 75 | entity_id: number.deyeinvertermaster_timezone6_time 76 | data: 77 | value: 78 | '{{state_attr(''input_datetime.timezone6_time'', ''timestamp'') | 79 | timestamp_custom("%H%M", false) | float}}' 80 | - conditions: 81 | - condition: trigger 82 | id: 83 | - sendUpdatetoHATimeObjects 84 | sequence: 85 | - action: input_datetime.set_datetime 86 | target: 87 | entity_id: input_datetime.timezone1_time 88 | data: 89 | time: 90 | "{% set min = ((states('number.deyeinvertermaster_timezone1_time') | int) 91 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone1_time') 92 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 93 | - action: input_datetime.set_datetime 94 | target: 95 | entity_id: input_datetime.timezone2_time 96 | data: 97 | time: 98 | "{% set min = ((states('number.deyeinvertermaster_timezone2_time') | int) 99 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone2_time') 100 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 101 | - action: input_datetime.set_datetime 102 | target: 103 | entity_id: input_datetime.timezone3_time 104 | data: 105 | time: 106 | "{% set min = ((states('number.deyeinvertermaster_timezone3_time') | int) 107 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone3_time') 108 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 109 | - action: input_datetime.set_datetime 110 | target: 111 | entity_id: input_datetime.timezone4_time 112 | data: 113 | time: 114 | "{% set min = ((states('number.deyeinvertermaster_timezone4_time') | int) 115 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone4_time') 116 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 117 | - action: input_datetime.set_datetime 118 | target: 119 | entity_id: input_datetime.timezone5_time 120 | data: 121 | time: 122 | "{% set min = ((states('number.deyeinvertermaster_timezone5_time') | int) 123 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone5_time') 124 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 125 | - action: input_datetime.set_datetime 126 | target: 127 | entity_id: input_datetime.timezone6_time 128 | data: 129 | time: 130 | "{% set min = ((states('number.deyeinvertermaster_timezone6_time') | int) 131 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone6_time') 132 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 133 | - delay: 134 | hours: 0 135 | minutes: 0 136 | seconds: 2 137 | milliseconds: 0 138 | mode: single 139 | - id: "1717083464657" 140 | alias: Server Sync Clock 141 | description: "" 142 | triggers: 143 | - trigger: time 144 | at: 00:50:00 145 | id: enableSync 146 | - trigger: time 147 | at: 01:10:00 148 | id: disableSync 149 | condition: [] 150 | actions: 151 | - choose: 152 | - conditions: 153 | - condition: trigger 154 | id: 155 | - enableSync 156 | sequence: 157 | - action: select.select_option 158 | target: 159 | entity_id: select.deyeinvertermaster_inverter_basic_settings_sync_clock 160 | data: 161 | option: Enable 162 | - conditions: 163 | - condition: trigger 164 | id: 165 | - disableSync 166 | sequence: 167 | - action: select.select_option 168 | metadata: {} 169 | data: 170 | option: Disable 171 | target: 172 | entity_id: select.deyeinvertermaster_inverter_basic_settings_sync_clock 173 | mode: single 174 | -------------------------------------------------------------------------------- /configuration.yaml: -------------------------------------------------------------------------------- 1 | # Loads default set of integrations. Do not remove. 2 | default_config: 3 | 4 | # Text to speech default config 5 | tts: 6 | - platform: google_translate 7 | 8 | automation: !include automations.yaml 9 | script: !include scripts.yaml 10 | scene: !include scenes.yaml 11 | template: !include template.yaml #we include template file here, soon replaced by packages folder 12 | #template: !include template_MasterSlave_System.yaml #change the config file depending on your system 13 | 14 | #The homeassistant packages will become the standard of loading configs going forward 15 | #be sure to add the packages folder and the 2 lines 16 | homeassistant: 17 | packages: !include_dir_named packages 18 | 19 | # Telegram Bot config now in packages/telegram.yaml 20 | 21 | # The sensor below keeps the minimum soc of the battery for the last 12 hours, 22 | #only removed from DeyeSolarDesktop, not important 23 | # sensor: 24 | # - platform: statistics 25 | # name: "min_soc_battery" 26 | # entity_id: sensor.deyeinverter_battery_soc 27 | # state_characteristic: value_min 28 | # max_age: 29 | # hours: 12 30 | # sampling_size: 144 31 | 32 | #These entries below define data fields to store the TimeOfUse values on home_assistant side 33 | #The automation will take a change in value and populate the value on the inverter accordingly 34 | input_datetime: 35 | timezone1_time: 36 | name: Timezone 1 Time 37 | has_date: false 38 | has_time: true 39 | timezone2_time: 40 | name: Timezone 2 Time 41 | has_date: false 42 | has_time: true 43 | timezone3_time: 44 | name: Timezone 3 Time 45 | has_date: false 46 | has_time: true 47 | timezone4_time: 48 | name: Timezone 4 Time 49 | has_date: false 50 | has_time: true 51 | timezone5_time: 52 | name: Timezone 5 Time 53 | has_date: false 54 | has_time: true 55 | timezone6_time: 56 | name: Timezone 6 Time 57 | has_date: false 58 | has_time: true 59 | 60 | sensor: 61 | - platform: integration 62 | name: deyeinvertermaster_summary_total_battery_charge_grid 63 | source: sensor.deyeinvertermaster_battery_charge_grid_power 64 | method: left 65 | 66 | - platform: integration 67 | name: deyeinverterslave_summary_total_battery_charge_grid 68 | source: sensor.deyeinverterslave_battery_charge_grid_power 69 | method: left 70 | 71 | utility_meter: 72 | master_energy_battery_charge_grid: 73 | name: deyeinvertermaster_summary_day_battery_charge_grid 74 | source: sensor.deyeinvertermaster_summary_total_battery_charge_grid 75 | cycle: daily 76 | 77 | slave_energy_battery_charge_grid: 78 | name: deyeinverterslave_summary_day_battery_charge_grid 79 | source: sensor.deyeinverterslave_summary_total_battery_charge_grid 80 | cycle: 81 | daily 82 | -------------------------------------------------------------------------------- /module.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomatensaus/DeyeSolarDesktop/39fc985b3b182207bf781e36ff8e9dc6473864a9/module.jpg -------------------------------------------------------------------------------- /packages/essentials_automation.yaml: -------------------------------------------------------------------------------- 1 | - id: '1686299812078' 2 | alias: 'Inverter: Switch to Export essentials/Non-Essentials when sun sets/rises' 3 | description: This stops the export to non-essentials from the battery when the sun 4 | is not shining, but during the day solar power is sent to non-essentials 5 | trigger: 6 | - platform: sun 7 | event: sunset 8 | offset: -00:45:00 9 | id: poweressentials 10 | - platform: sun 11 | event: sunrise 12 | offset: 00:45:00 13 | id: powernonessentials 14 | condition: [] 15 | actions: 16 | - choose: 17 | - conditions: 18 | - condition: trigger 19 | id: poweressentials 20 | sequence: 21 | - action: select.select_option 22 | data: 23 | option: Essentials 24 | target: 25 | entity_id: select.deyeinvertermaster_load_limit_exp_ess_non_ess 26 | - conditions: 27 | - condition: trigger 28 | id: powernonessentials 29 | sequence: 30 | - action: select.select_option 31 | data: 32 | option: Zero Export 33 | target: 34 | entity_id: select.deyeinvertermaster_load_limit_exp_ess_non_ess 35 | mode: single 36 | 37 | -------------------------------------------------------------------------------- /packages/nordpool_automation.yaml: -------------------------------------------------------------------------------- 1 | - id: '1708977359107' 2 | alias: 'Monitor Charge price automation ' 3 | description: '' 4 | triggers: 5 | - entity_id: 6 | - sensor.nordpool_kwh_lt_eur_3_095_021 7 | trigger: state 8 | - entity_id: 9 | - input_number.charge_below_price 10 | trigger: state 11 | - entity_id: 12 | - input_number.discharge_above_price 13 | trigger: state 14 | conditions: [] 15 | actions: 16 | - choose: 17 | - conditions: 18 | - condition: template 19 | value_template: '{{ states("sensor.nordpool_kwh_lt_eur_3_095_021") <= states("input_number.charge_below_price")}}' 20 | sequence: 21 | - action: input_boolean.turn_on 22 | metadata: {} 23 | data: {} 24 | target: 25 | entity_id: input_boolean.charge_battery_switch 26 | - conditions: 27 | - condition: template 28 | value_template: '{{ states("sensor.nordpool_kwh_lt_eur_3_095_021") > states("input_number.charge_below_price")}}' 29 | sequence: 30 | - action: input_boolean.turn_off 31 | target: 32 | entity_id: input_boolean.charge_battery_switch 33 | data: {} 34 | mode: single 35 | - id: '1709319682608' 36 | alias: Discharge Settings Change 37 | description: '' 38 | triggers: 39 | - entity_id: 40 | - input_boolean.discharge_battery_switch 41 | from: 'off' 42 | to: 'on' 43 | id: Enable Discharge 44 | trigger: state 45 | - entity_id: 46 | - input_boolean.discharge_battery_switch 47 | id: Disable Discharge 48 | from: 'on' 49 | to: 'off' 50 | trigger: state 51 | conditions: 52 | - condition: state 53 | entity_id: input_boolean.discharge_automation_enable 54 | state: 'on' 55 | actions: 56 | - choose: 57 | - conditions: 58 | - condition: trigger 59 | id: 60 | - Enable Discharge 61 | sequence: 62 | - action: switch.turn_on 63 | metadata: {} 64 | data: {} 65 | target: 66 | entity_id: switch.deyeinvertermaster_time_of_use 67 | enabled: false 68 | - action: select.select_option 69 | metadata: {} 70 | data: 71 | option: Allow Export 72 | target: 73 | entity_id: select.deyeinvertermaster_load_limit_exp_ess_non_ess 74 | - action: scene.create 75 | metadata: {} 76 | data: 77 | snapshot_entities: 78 | - number.deyeinvertermaster_timezone1_soc 79 | - number.deyeinvertermaster_timezone2_soc 80 | - number.deyeinvertermaster_timezone3_soc 81 | - number.deyeinvertermaster_timezone4_soc 82 | - number.deyeinvertermaster_timezone5_soc 83 | - number.deyeinvertermaster_timezone6_soc 84 | scene_id: normal_settings 85 | - action: number.set_value 86 | metadata: {} 87 | data: 88 | value: '50' 89 | target: 90 | entity_id: 91 | - number.deyeinvertermaster_timezone1_soc 92 | - number.deyeinvertermaster_timezone2_soc 93 | - number.deyeinvertermaster_timezone3_soc 94 | - number.deyeinvertermaster_timezone4_soc 95 | - number.deyeinvertermaster_timezone5_soc 96 | - number.deyeinvertermaster_timezone6_soc 97 | - conditions: 98 | - condition: trigger 99 | id: 100 | - Disable Discharge 101 | sequence: 102 | - action: switch.turn_off 103 | metadata: {} 104 | data: {} 105 | target: 106 | entity_id: switch.deyeinvertermaster_time_of_use 107 | enabled: false 108 | - action: select.select_option 109 | metadata: {} 110 | data: 111 | option: Zero Export 112 | target: 113 | entity_id: select.deyeinvertermaster_load_limit_exp_ess_non_ess 114 | - metadata: {} 115 | target: 116 | entity_id: scene.normal_settings 117 | action: scene.turn_on 118 | mode: single 119 | - id: '1709319936727' 120 | alias: Charge Settings Change 121 | description: '' 122 | triggers: 123 | - entity_id: 124 | - input_boolean.charge_battery_switch 125 | from: 'off' 126 | to: 'on' 127 | id: Enable Charge from Grid 128 | trigger: state 129 | - entity_id: 130 | - input_boolean.charge_battery_switch 131 | from: 'on' 132 | to: 'off' 133 | id: Disable Charge from Grid 134 | trigger: state 135 | conditions: 136 | - condition: state 137 | entity_id: input_boolean.charge_automation_enable 138 | state: 'on' 139 | actions: 140 | - choose: 141 | - conditions: 142 | - condition: trigger 143 | id: 144 | - Enable Charge from Grid 145 | sequence: 146 | - action: switch.turn_on 147 | metadata: {} 148 | data: {} 149 | target: 150 | entity_id: switch.deyeinvertermaster_battery_grid_charge_enabled 151 | - action: switch.turn_off 152 | metadata: {} 153 | data: {} 154 | target: 155 | entity_id: switch.deyeinvertermaster_time_of_use 156 | enabled: false 157 | - action: scene.create 158 | metadata: {} 159 | data: 160 | scene_id: before_battery_charge 161 | snapshot_entities: 162 | - select.deyeinvertermaster_timezone1_charge 163 | - select.deyeinvertermaster_timezone2_charge 164 | - select.deyeinvertermaster_timezone3_charge 165 | - select.deyeinvertermaster_timezone4_charge 166 | - select.deyeinvertermaster_timezone5_charge 167 | - select.deyeinvertermaster_timezone6_charge 168 | - number.deyeinvertermaster_timezone1_soc 169 | - number.deyeinvertermaster_timezone2_soc 170 | - number.deyeinvertermaster_timezone3_soc 171 | - number.deyeinvertermaster_timezone4_soc 172 | - number.deyeinvertermaster_timezone5_soc 173 | - number.deyeinvertermaster_timezone6_soc 174 | enabled: true 175 | - action: select.select_option 176 | metadata: {} 177 | data: 178 | option: Grid 179 | target: 180 | entity_id: 181 | - select.deyeinvertermaster_timezone1_charge 182 | - select.deyeinvertermaster_timezone2_charge 183 | - select.deyeinvertermaster_timezone3_charge 184 | - select.deyeinvertermaster_timezone4_charge 185 | - select.deyeinvertermaster_timezone5_charge 186 | - select.deyeinvertermaster_timezone6_charge 187 | enabled: true 188 | - action: number.set_value 189 | metadata: {} 190 | data: 191 | value: '{{ states("input_number.charge_battery_target_percentage") }}' 192 | target: 193 | entity_id: 194 | - number.deyeinvertermaster_timezone1_soc 195 | - number.deyeinvertermaster_timezone2_soc 196 | - number.deyeinvertermaster_timezone3_soc 197 | - number.deyeinvertermaster_timezone4_soc 198 | - number.deyeinvertermaster_timezone5_soc 199 | - number.deyeinvertermaster_timezone6_soc 200 | enabled: true 201 | - conditions: 202 | - condition: trigger 203 | id: 204 | - Disable Charge from Grid 205 | sequence: 206 | - action: switch.turn_off 207 | metadata: {} 208 | data: {} 209 | target: 210 | entity_id: switch.deyeinvertermaster_battery_grid_charge_enabled 211 | enabled: true 212 | - action: switch.turn_on 213 | metadata: {} 214 | data: {} 215 | target: 216 | entity_id: switch.deyeinvertermaster_time_of_use 217 | enabled: false 218 | - action: scene.turn_on 219 | metadata: {} 220 | target: 221 | entity_id: scene.before_battery_charge 222 | enabled: true 223 | mode: single 224 | - id: '1709538239920' 225 | alias: Monitor Discharge price Automation 226 | description: '' 227 | triggers: 228 | - entity_id: 229 | - sensor.nordpool_kwh_lt_eur_3_095_021 230 | trigger: state 231 | - entity_id: 232 | - input_number.charge_below_price 233 | trigger: state 234 | - entity_id: 235 | - input_number.discharge_above_price 236 | trigger: state 237 | conditions: [] 238 | actions: 239 | - choose: 240 | - conditions: 241 | - condition: template 242 | value_template: '{{ states("sensor.nordpool_kwh_lt_eur_3_095_021") >= states("input_number.discharge_above_price")}}' 243 | sequence: 244 | - action: input_boolean.turn_on 245 | target: 246 | entity_id: input_boolean.discharge_battery_switch 247 | data: {} 248 | - conditions: 249 | - condition: template 250 | value_template: '{{ states("sensor.nordpool_kwh_lt_eur_3_095_021") < states("input_number.discharge_above_price")}}' 251 | sequence: 252 | - action: input_boolean.turn_off 253 | target: 254 | entity_id: input_boolean.discharge_battery_switch 255 | data: {} 256 | mode: single 257 | - id: '1736228839643' 258 | alias: Automatically Update Charge Price 259 | description: Automate the price so you do not need to monitor prices 260 | triggers: 261 | - trigger: state 262 | entity_id: 263 | - sensor.suggested_cheap_price 264 | - trigger: state 265 | entity_id: 266 | - automation.automatically_update_charge_price 267 | from: 'off' 268 | to: 'on' 269 | conditions: [] 270 | actions: 271 | - action: input_number.set_value 272 | metadata: {} 273 | data: 274 | value: '{{ states("sensor.suggested_cheap_price") }}' 275 | target: 276 | entity_id: input_number.charge_below_price 277 | mode: single 278 | -------------------------------------------------------------------------------- /packages/nordpool_dashboard.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - title: Home 3 | cards: 4 | - type: entities 5 | entities: 6 | - entity: input_boolean.charge_automation_enable 7 | name: Enable Charging System 8 | - entity: sensor.nordpool_kwh_lt_eur_3_095_021 9 | - entity: sensor.suggested_cheap_price 10 | - entity: input_number.charge_below_price 11 | name: Charge on/below price 12 | - entity: input_boolean.charge_battery_switch 13 | - entity: number.deyeinvertermaster_grid_charge_current 14 | - entity: input_number.charge_battery_target_percentage 15 | - entity: switch.deyeinvertermaster_battery_grid_charge_enabled 16 | - entity: automation.charge_settings_change 17 | - entity: automation.automatically_update_charge_price 18 | title: Charge 19 | show_header_toggle: false 20 | - type: entities 21 | entities: 22 | - entity: input_boolean.discharge_automation_enable 23 | name: Enable Discharging System 24 | - entity: input_number.discharge_above_price 25 | name: Discharge on/above price 26 | - entity: input_boolean.discharge_battery_switch 27 | - entity: number.deyeinvertermaster_export_limit 28 | - entity: select.deyeinvertermaster_load_limit_exp_ess_non_ess 29 | - entity: automation.discharge_settings_change 30 | title: Discharge 31 | show_header_toggle: false 32 | - type: history-graph 33 | entities: 34 | - entity: input_boolean.discharge_battery_switch 35 | - entity: input_boolean.charge_battery_switch 36 | - entity: sensor.nordpool_kwh_lt_eur_3_095_021 37 | - entity: sensor.suggested_cheap_price 38 | title: Debug State 39 | - type: markdown 40 | content: " ## System Timer Settings\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Time Slot\n \n Power\n \n Bat SOC\n \n\tCharge\n\t
\n {{state_attr('input_datetime.timezone1_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone2_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone1_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone1_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone1_charge')}}\n\t
\n {{state_attr('input_datetime.timezone2_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone3_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone2_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone2_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone2_charge')}}\n\t
\n {{state_attr('input_datetime.timezone3_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone4_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone3_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone3_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone3_charge')}}\n\t
\n {{state_attr('input_datetime.timezone4_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone5_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone4_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone4_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone4_charge')}}\n\t
\n {{state_attr('input_datetime.timezone5_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone6_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone5_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone5_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone5_charge')}}\n\t
\n {{state_attr('input_datetime.timezone6_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone1_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone6_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone6_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone6_charge')}}\n\t
" 41 | title: Timer 42 | - type: custom:sunsynk-power-flow-card 43 | cardstyle: lite 44 | show_solar: true 45 | card_height: 410px 46 | show_grid: true 47 | solar: 48 | mppts: 4 49 | display_mode: 2 50 | colour: orange 51 | show_daily: true 52 | animation_speed: 6 53 | max_power: 50000 54 | auto_scale: true 55 | inverter: 56 | modern: true 57 | colour: grey 58 | battery: 59 | energy: 138000 60 | shutdown_soc: 8 61 | invert_power: false 62 | colour: green 63 | show_daily: true 64 | animation_speed: 6 65 | max_power: 50000 66 | load: 67 | colour: '#5fb6ad' 68 | show_daily: true 69 | show_aux: false 70 | animation_speed: 4 71 | max_power: 40000 72 | grid: 73 | colour: '#5490c2' 74 | show_daily_buy: true 75 | show_daily_sell: true 76 | no_grid_colour: red 77 | show_nonessential: true 78 | animation_speed: 9 79 | max_power: 6000 80 | entities: 81 | use_timer_248: switch.deyeinvertermaster_time_of_use 82 | priority_load_243: sensor.deyeinvertermaster_priority_charge_or_load 83 | day_battery_charge_70: sensor.deyeinvertermaster_summary_day_battery_charge 84 | day_battery_discharge_71: sensor.deyeinvertermaster_summary_day_battery_discharge 85 | day_load_energy_84: sensor.deyeinvertermaster_summary_day_load 86 | day_grid_import_76: sensor.deyeinvertermaster_summary_day_grid_import_buy 87 | day_grid_export_77: sensor.deyeinvertermaster_summary_day_grid_export_sell 88 | day_pv_energy_108: sensor.deyeinvertermaster_summary_day_pv 89 | inverter_voltage_154: sensor.deyeinvertermaster_grid_voltage_l1 90 | load_frequency_192: sensor.deyeinvertermaster_grid_frequency 91 | inverter_current_164: sensor.deyeinvertermaster_inverter_output_current_l1 92 | inverter_power_175: sensor.deyeinvertermaster_inverter_output_power 93 | grid_power_169: sensor.deyeinvertermaster_grid_load 94 | radiator_temp_91: sensor.deyeinvertermaster_temperature_ac_transformer 95 | dc_transformer_temp_90: sensor.deyeinvertermaster_temperature_dc_transformer 96 | pv1_power_186: sensor.deyeinvertermaster_pv1_power 97 | pv2_power_187: sensor.deyeinvertermaster_pv2_power 98 | pv3_power_188: sensor.deyeinvertermaster_pv3_power 99 | pv4_power_189: sensor.deyeinvertermaster_pv4_power 100 | battery_voltage_183: sensor.deyeinvertermaster_battery_voltage 101 | battery_soc_184: sensor.deyeinvertermaster_battery_soc 102 | battery_power_190: sensor.deyeinvertermaster_battery_output_power 103 | battery_current_191: sensor.deyeinvertermaster_battery_output_current 104 | battery_temp_182: sensor.deyeinvertermaster_battery_temperature 105 | grid_ct_power_172: sensor.deyeinvertermaster_grid_power_ct_clamp 106 | pv1_voltage_109: sensor.deyeinvertermaster_pv1_voltage 107 | pv1_current_110: sensor.deyeinvertermaster_pv1_current 108 | pv2_voltage_111: sensor.deyeinvertermaster_pv2_voltage 109 | pv2_current_112: sensor.deyeinvertermaster_pv2_current 110 | pv3_voltage_113: sensor.deyeinvertermaster_pv3_voltage 111 | pv3_current_114: sensor.deyeinvertermaster_pv3_current 112 | pv4_voltage_115: sensor.deyeinvertermaster_pv4_voltage 113 | pv4_current_116: sensor.deyeinvertermaster_pv4_current 114 | grid_connected_status_194: binary_sensor.deyeinvertermaster_grid_connected_status 115 | inverter_status_59: sensor.deyeinvertermaster_inverter_system_state 116 | aux_power_166: sensor.deyeinvertermaster_aux_output_power 117 | remaining_solar: sensor.energy_production_today 118 | solar_sell_247: switch.deyeinvertermaster_export_solar_enabled 119 | decimal_places: 1 120 | - type: custom:apexcharts-card 121 | hours_12: false 122 | header: 123 | show: true 124 | title: Nordpool (estimate) Prices (c) 125 | show_states: true 126 | now: 127 | show: true 128 | color: '#ff0000' 129 | label: Now 130 | graph_span: 2d 131 | span: 132 | start: day 133 | series: 134 | - entity: sensor.nordpool_kwh_lt_eur_3_095_021 135 | name: Today 136 | unit: eur/kWh 137 | data_generator: | 138 | return entity.attributes.raw_today.map((entry) => { 139 | return [new Date(entry.start), entry.value * 100]; 140 | }); 141 | type: column 142 | show: 143 | legend_value: false 144 | in_header: false 145 | - entity: sensor.nordpool_kwh_lt_eur_3_095_021 146 | name: Tomorrow 147 | unit: eur/kWh 148 | data_generator: | 149 | return entity.attributes.raw_tomorrow.map((entry) => { 150 | return [new Date(entry.start), entry.value * 100]; 151 | }); 152 | type: column 153 | show: 154 | legend_value: false 155 | in_header: false 156 | -------------------------------------------------------------------------------- /packages/nordpoool.yaml: -------------------------------------------------------------------------------- 1 | template: 2 | - sensor: 3 | - name: "Suggested Cheap Price" 4 | unique_id: "suggested_cheap_price" 5 | unit_of_measurement: "EUR/kWh" 6 | state: > 7 | {% set current_hour = now().hour %} 8 | {% set prices_today = state_attr('sensor.nordpool_kwh_lt_eur_3_095_021', 'raw_today') %} 9 | {% set prices_tomorrow = state_attr('sensor.nordpool_kwh_lt_eur_3_095_021', 'raw_tomorrow') %} 10 | {% set tomorrow_valid = state_attr('sensor.nordpool_kwh_lt_eur_3_095_021', 'tomorrow_valid') %} 11 | 12 | {# Combine today and tomorrow prices, ignoring past hours #} 13 | {% set future_prices = prices_today[current_hour:] + (prices_tomorrow if tomorrow_valid else []) %} 14 | {% set number_prices = future_prices | count %} 15 | 16 | {% if number_prices <= 24 %} 17 | {# if future prices are not available just use the lowest of all prices we have #} 18 | {% set future_prices = prices_today + (prices_tomorrow if tomorrow_valid else []) %} 19 | {% endif %} 20 | 21 | {% if current_hour <= 6 %} 22 | {# if early hours of the morning just use the best nightly rates available to get through the day #} 23 | {% set future_prices = prices_today %} 24 | {% endif %} 25 | 26 | 27 | {# Extract only the 'value' key from each dictionary #} 28 | {% set future_values = future_prices | map(attribute='value') | list %} 29 | 30 | {# Sort the extracted values #} 31 | {% set sorted_values = future_values | sort %} 32 | 33 | {# Take the lowest X values and find the maximum #} 34 | {% set lowest_prices = sorted_values[:6] %} 35 | {% set suggested_price = lowest_prices | max %} 36 | {{ suggested_price | round(3) }} 37 | availability: > 38 | {{ states('sensor.nordpool_kwh_lt_eur_3_095_021') != 'unavailable' }} 39 | 40 | sensor: 41 | - platform: nordpool 42 | # Country/region to get the energy prices for. 43 | region: "LT" 44 | 45 | # Override HA local currency used to fetch the prices from the API. 46 | currency: "EUR" 47 | 48 | # Add Value Added Taxes (VAT)? 49 | VAT: True 50 | 51 | # Energy price rounding precision. 52 | precision: 3 53 | 54 | # Percentage of average price to set the low price attribute 55 | # low_price = hour_price < average * low_price_cutoff 56 | low_price_cutoff: 0.95 57 | 58 | # Display price in cents in stead of (for example) Euros. 59 | price_in_cents: false 60 | 61 | # Price displayed for MWh, kWh or Wh 62 | price_type: kWh 63 | 64 | # Template to specify additional cost to be added to the tariff. 65 | # The template price is in EUR, DKK, NOK or SEK (not in cents). 66 | # For example: "{{ current_price * 0.19 + 0.023 | float}}" 67 | additional_costs: "{{0.0|float}}" 68 | 69 | input_number: 70 | charge_below_price: 71 | name: Charge battery below price 72 | min: 0.001 73 | max: 0.15 74 | step: 0.001 75 | mode: box 76 | 77 | discharge_above_price: 78 | name: Discharge battery above price 79 | min: 0.001 80 | max: 5.0 81 | step: 0.001 82 | mode: box 83 | 84 | charge_battery_target_percentage: 85 | name: Charge Battery Target 86 | min: 0.0 87 | max: 100.0 88 | step: 1.0 89 | mode: box 90 | unit_of_measurement: "%" 91 | 92 | input_boolean: 93 | charge_battery_switch: 94 | name: Triggers Battery Charging 95 | 96 | discharge_battery_switch: 97 | name: Triggers Battery Discharging 98 | 99 | charge_automation_enable: 100 | name: Enable Charging 101 | 102 | discharge_automation_enable: 103 | name: Enable Discharging 104 | -------------------------------------------------------------------------------- /packages/octopusflux.yaml: -------------------------------------------------------------------------------- 1 | template: 2 | sensor: 3 | #Calculating the power needed to reach target SOC during export 4 | - name: "deyeinvertermaster_timezone4_estimate_export_power" 5 | unit_of_measurement: "W" 6 | device_class: power 7 | state_class: measurement 8 | state: >- 9 | {% set hoursleft = (- now().timestamp() | int + today_at(states("input_datetime.timezone5_time")).timestamp() | int ) / 60.0 / 60.0 %} 10 | {% set soc = states("sensor.deyeinvertermaster_battery_soc") | int %} 11 | {% set cap = ((states("number.deyeinvertermaster_battery_capacity_ah") | int) * 50.0 | float) %} 12 | {% set target = ((states("number.deyeinvertermaster_timezone4_soc") | int) ) %} 13 | {% set reserve = ((states("input_number.deyeinvertermaster_discharge_reserve") | int) ) %} 14 | {% set capremaining = ((soc - (target + reserve))/100.0) * cap %} 15 | {% if (hoursleft > 0.0003) and (capremaining > 0.0) %} 16 | {% set poweroutput = ((capremaining / hoursleft) | int) %} 17 | {% set discharge = poweroutput if (poweroutput < 4000) else 4000 %} 18 | {% else %} 19 | {% set discharge = 100 %} 20 | {% endif %} 21 | {{discharge}} 22 | 23 | # hours left: {{hoursleft}} 24 | # TargetSOC: {{target}} 25 | # TotalCapacity: {{cap}} 26 | # CapRemaining = {{ capremaining}} 27 | # Suggested Discharge: 28 | 29 | # {# {{now().timestamp() | int }} 30 | # {{today_at("19:00").timestamp() | int }} #} 31 | 32 | #Calculating the current needed to reach target SOC during import 33 | - name: "deyeinvertermaster_timezone1_estimate_charge_current" 34 | unit_of_measurement: "A" 35 | device_class: current 36 | state_class: measurement 37 | state: >- 38 | {% set hoursleft = (- now().timestamp() | int + today_at(states("input_datetime.timezone2_time")).timestamp() | int ) / 60.0 / 60.0 %} 39 | {% set soc = states("sensor.deyeinvertermaster_battery_soc") | int %} 40 | {% set cap = ((states("number.deyeinvertermaster_battery_capacity_ah") | int) * 52.0 | float) %} 41 | {% set target = ((states("number.deyeinvertermaster_timezone1_soc") | int) ) %} 42 | {% set captocharge = ((target - (soc))/100.0) * cap %} 43 | {% if (hoursleft > 0.0003) and (captocharge > 0.0) %} 44 | {% set poweroutputloss = 1.14 | float %} 45 | {% set poweroutputW = (((captocharge / hoursleft) | int)) | int %} 46 | {% set poweroutputA = ((((poweroutputW) / 55) | int) * poweroutputloss) | int %} 47 | {% set charge = poweroutputA if (poweroutputA < 120) else 120 %} 48 | {% else %} 49 | {% set charge = 12 %} 50 | {% endif %} 51 | {{charge}} 52 | 53 | # hours left: {{hoursleft}} 54 | # SOC: {{soc}} 55 | # TargetSOC: {{target}} 56 | # TotalCapacity: {{cap}} 57 | # CapToCharge = {{ captocharge}} 58 | # poweroutputW = {{ poweroutputW}} 59 | # poweroutputA = {{ poweroutputA}} 60 | # Suggested Charge: {{charge}} 61 | 62 | sensor: 63 | - platform: filter 64 | name: "deyeinvertermaster_timezone4_estimate_export_power_filtered" 65 | entity_id: sensor.deyeinvertermaster_timezone4_estimate_export_power 66 | filters: 67 | - filter: time_simple_moving_average 68 | window_size: "00:08" 69 | precision: 0 70 | - platform: filter 71 | name: "deyeinvertermaster_timezone1_estimate_charge_current_filtered" 72 | entity_id: sensor.deyeinvertermaster_timezone1_estimate_charge_current 73 | filters: 74 | - filter: time_simple_moving_average 75 | window_size: "00:08" 76 | precision: 0 77 | input_number: 78 | deyeinvertermaster_discharge_reserve: 79 | name: DeyeinverterMaster Discharge Reserve 80 | min: 0 81 | max: 100 82 | step: 1 83 | mode: box 84 | unit_of_measurement: "%" 85 | 86 | input_select: 87 | octopus_energy_state: 88 | name: Octopus Energy Run Mode 89 | options: 90 | - "start charge" #at 2am 91 | - "stop charge" #at 5am 92 | - "start discharge" #at 4pm 93 | - "stop discharge" #at 7pm 94 | - "normal" #run rest of time 95 | - "disable" #ignore charge and discharge 96 | -------------------------------------------------------------------------------- /packages/octopusflux_automations.yaml: -------------------------------------------------------------------------------- 1 | - id: '1710562585517' 2 | alias: Solcast_update 3 | description: New API call Solcast 4 | trigger: 5 | - platform: time_pattern 6 | hours: /4 7 | condition: 8 | - condition: sun 9 | before: sunset 10 | after: sunrise 11 | actions: 12 | - action: solcast_solar.update_forecasts 13 | data: {} 14 | mode: single 15 | - id: '1712779724660' 16 | alias: Energy - Start Charge 17 | description: '' 18 | trigger: 19 | - platform: state 20 | entity_id: 21 | - input_select.octopus_energy_state 22 | to: start charge 23 | for: 24 | hours: 0 25 | minutes: 0 26 | seconds: 15 27 | condition: [] 28 | actions: 29 | - action: number.set_value 30 | metadata: {} 31 | data: 32 | value: '85' 33 | target: 34 | entity_id: number.deyeinvertermaster_grid_charge_current 35 | enabled: false 36 | - action: switch.turn_on 37 | metadata: {} 38 | data: {} 39 | target: 40 | entity_id: switch.deyeinvertermaster_battery_grid_charge_enabled 41 | - action: select.select_option 42 | metadata: {} 43 | data: 44 | option: Grid 45 | target: 46 | entity_id: select.deyeinvertermaster_timezone1_charge 47 | mode: single 48 | - id: '1712831382846' 49 | alias: Energy Stop Charge 50 | description: '' 51 | trigger: 52 | - platform: state 53 | entity_id: 54 | - input_select.octopus_energy_state 55 | to: stop charge 56 | for: 57 | hours: 0 58 | minutes: 0 59 | seconds: 15 60 | condition: [] 61 | actions: 62 | - action: select.select_option 63 | metadata: {} 64 | data: 65 | option: None 66 | target: 67 | entity_id: select.deyeinvertermaster_timezone1_charge 68 | - delay: 69 | hours: 0 70 | minutes: 1 71 | seconds: 0 72 | milliseconds: 0 73 | - action: number.set_value 74 | metadata: {} 75 | data: 76 | value: 85 77 | target: 78 | entity_id: number.deyeinvertermaster_grid_charge_current 79 | enabled: true 80 | mode: single 81 | - id: '1712832456126' 82 | alias: Energy Start Export 83 | description: '' 84 | trigger: 85 | - platform: state 86 | entity_id: 87 | - input_select.octopus_energy_state 88 | to: start discharge 89 | for: 90 | hours: 0 91 | minutes: 0 92 | seconds: 15 93 | condition: [] 94 | actions: 95 | - action: select.select_option 96 | metadata: {} 97 | data: 98 | option: Allow Export 99 | target: 100 | entity_id: select.deyeinvertermaster_load_limit_exp_ess_non_ess 101 | mode: single 102 | - id: '1712832480479' 103 | alias: Energy Stop Export 104 | description: '' 105 | trigger: 106 | - platform: state 107 | entity_id: 108 | - input_select.octopus_energy_state 109 | to: stop discharge 110 | for: 111 | hours: 0 112 | minutes: 0 113 | seconds: 15 114 | condition: [] 115 | actions: 116 | - action: select.select_option 117 | metadata: {} 118 | data: 119 | option: Zero Export 120 | target: 121 | entity_id: select.deyeinvertermaster_load_limit_exp_ess_non_ess 122 | - delay: 123 | hours: 0 124 | minutes: 1 125 | seconds: 0 126 | milliseconds: 0 127 | - action: number.set_value 128 | metadata: {} 129 | data: 130 | value: 5000 131 | target: 132 | entity_id: number.deyeinvertermaster_timezone4_power 133 | mode: single 134 | - id: '1712838905064' 135 | alias: Energy Time Trigger 136 | description: '' 137 | trigger: 138 | - platform: time 139 | at: 02:01:00 140 | id: startCharge 141 | - platform: time 142 | at: 04:59:00 143 | id: stopCharge 144 | - platform: time 145 | at: '16:00:00' 146 | id: startExport 147 | - platform: time 148 | at: '19:00:00' 149 | id: stopExport 150 | condition: 151 | - condition: not 152 | conditions: 153 | - condition: state 154 | entity_id: input_select.octopus_energy_state 155 | state: disable 156 | actions: 157 | - choose: 158 | - conditions: 159 | - condition: trigger 160 | id: 161 | - startCharge 162 | sequence: 163 | - action: input_select.select_option 164 | metadata: {} 165 | data: 166 | option: start charge 167 | target: 168 | entity_id: input_select.octopus_energy_state 169 | - conditions: 170 | - condition: trigger 171 | id: 172 | - stopCharge 173 | sequence: 174 | - action: input_select.select_option 175 | metadata: {} 176 | data: 177 | option: stop charge 178 | target: 179 | entity_id: input_select.octopus_energy_state 180 | - conditions: 181 | - condition: trigger 182 | id: 183 | - startExport 184 | sequence: 185 | - action: input_select.select_option 186 | metadata: {} 187 | data: 188 | option: start discharge 189 | target: 190 | entity_id: input_select.octopus_energy_state 191 | - conditions: 192 | - condition: trigger 193 | id: 194 | - stopExport 195 | sequence: 196 | - action: input_select.select_option 197 | metadata: {} 198 | data: 199 | option: stop discharge 200 | target: 201 | entity_id: input_select.octopus_energy_state 202 | mode: single 203 | - id: '1713294916505' 204 | alias: Energy Update Discharge Rates 205 | description: '' 206 | trigger: 207 | - platform: time_pattern 208 | minutes: /3 209 | enabled: false 210 | - platform: state 211 | entity_id: 212 | - sensor.deyeinvertermaster_battery_soc 213 | condition: 214 | - condition: state 215 | entity_id: input_select.octopus_energy_state 216 | state: start discharge 217 | enabled: true 218 | actions: 219 | - action: number.set_value 220 | metadata: {} 221 | data: 222 | value: '{{states(''sensor.deyeinvertermaster_timezone4_estimate_export_power_filtered'')}}' 223 | target: 224 | entity_id: number.deyeinvertermaster_timezone4_power 225 | mode: single 226 | - id: '1714048088646' 227 | alias: Energy Update Charge Current 228 | description: '' 229 | trigger: 230 | - platform: time_pattern 231 | minutes: /3 232 | enabled: false 233 | - platform: state 234 | entity_id: 235 | - sensor.deyeinvertermaster_battery_soc 236 | condition: 237 | - condition: state 238 | entity_id: input_select.octopus_energy_state 239 | state: start charge 240 | enabled: true 241 | actions: 242 | - action: number.set_value 243 | metadata: {} 244 | data: 245 | value: '{{states(''sensor.deyeinvertermaster_timezone1_estimate_charge_current_filtered'')}}' 246 | target: 247 | entity_id: number.deyeinvertermaster_grid_charge_current 248 | enabled: true 249 | mode: single 250 | -------------------------------------------------------------------------------- /packages/octopusflux_dashboard_importexport.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - title: Home 3 | cards: 4 | - type: entity 5 | entity: input_select.octopus_energy_state 6 | - type: entities 7 | entities: 8 | - entity: automation.energy_start_charge 9 | - entity: automation.energy_stop_charge 10 | - entity: automation.energy_start_export 11 | - entity: automation.energy_stop_export 12 | - entity: automation.energy_update_discharge_rates 13 | - entity: automation.energy_update_charge_current 14 | title: Settings Automations 15 | show_header_toggle: false 16 | - type: entities 17 | entities: 18 | - entity: automation.energy_time_trigger 19 | title: Time Triggers 20 | show_header_toggle: false 21 | - type: markdown 22 | content: " ## System Timer Settings\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Time Slot\n \n Power\n \n Bat SOC\n \n\tCharge\n\t
\n {{state_attr('input_datetime.timezone1_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone2_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone1_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone1_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone1_charge')}}\n\t
\n {{state_attr('input_datetime.timezone2_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone3_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone2_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone2_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone2_charge')}}\n\t
\n {{state_attr('input_datetime.timezone3_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone4_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone3_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone3_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone3_charge')}}\n\t
\n {{state_attr('input_datetime.timezone4_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone5_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone4_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone4_soc') }} + \n {{ states('input_number.deyeinvertermaster_discharge_reserve') }} %\n \n\t{{states('select.deyeinvertermaster_timezone4_charge')}}\n\t
\n {{state_attr('input_datetime.timezone5_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone6_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone5_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone5_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone5_charge')}}\n\t
\n {{state_attr('input_datetime.timezone6_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone1_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone6_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone6_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone6_charge')}}\n\t
" 23 | - type: entities 24 | entities: 25 | - entity: number.deyeinvertermaster_grid_charge_current 26 | name: Grid Charge Amps 27 | - entity: number.deyeinvertermaster_timezone1_soc 28 | name: Max Grid Chrg SOC 29 | - entity: sensor.deyeinvertermaster_timezone1_estimate_charge_current 30 | name: Estimate Charge Current 31 | - entity: >- 32 | sensor.deyeinvertermaster_timezone1_estimate_charge_current_filtered 33 | name: Estimate Charge Smoothed 34 | - entity: sensor.solcast_pv_forecast_forecast_tomorrow 35 | name: 'PV Forecast Tomorrow ' 36 | - entity: sensor.solcast_pv_forecast_forecast_today 37 | name: PV Forecast Today 38 | - entity: sensor.deyeinvertermaster_summary_day_pv 39 | name: Actual Generation Today 40 | title: Charge Manual Options 41 | - type: entities 42 | entities: 43 | - entity: number.deyeinvertermaster_timezone4_soc 44 | name: Min Grid Disch % 45 | - entity: input_number.deyeinvertermaster_discharge_reserve 46 | name: Discharge Reserve 47 | - entity: number.deyeinvertermaster_timezone4_power 48 | name: Discharge Power 49 | - entity: sensor.deyeinvertermaster_timezone4_estimate_export_power 50 | name: Estimate Export Power 51 | - entity: sensor.deyeinvertermaster_timezone4_estimate_export_power_filtered 52 | name: Estimate Export Smoothed 53 | title: Discharge Manual Options 54 | - type: custom:sunsynk-power-flow-card 55 | cardstyle: full 56 | show_solar: true 57 | card_height: 410px 58 | show_grid: true 59 | solar: 60 | mppts: 2 61 | display_mode: 2 62 | colour: orange 63 | show_daily: true 64 | animation_speed: 6 65 | max_power: 50000 66 | auto_scale: true 67 | inverter: 68 | modern: true 69 | colour: grey 70 | three_phase: false 71 | battery: 72 | energy: 15000 73 | shutdown_soc: 30 74 | invert_power: false 75 | colour: green 76 | show_daily: true 77 | animation_speed: 6 78 | max_power: 50000 79 | load: 80 | colour: '#5fb6ad' 81 | show_daily: true 82 | show_aux: false 83 | animation_speed: 4 84 | max_power: 80000 85 | aux_name: Aux 86 | aux_colour: 87 | - 0 88 | - 238 89 | - 255 90 | aux_type: mdi:air-conditioner 91 | show_daily_aux: true 92 | invert_aux: false 93 | show_absolute_aux: false 94 | grid: 95 | colour: '#5490c2' 96 | show_daily_buy: true 97 | show_daily_sell: true 98 | no_grid_colour: red 99 | show_nonessential: true 100 | animation_speed: 9 101 | max_power: 6000 102 | entities: 103 | use_timer_248: switch.deyeinvertermaster_time_of_use 104 | priority_load_243: sensor.deyeinvertermaster_priority_charge_or_load 105 | day_battery_charge_70: sensor.deyeinvertermaster_summary_day_battery_charge 106 | day_battery_discharge_71: sensor.deyeinvertermaster_summary_day_battery_discharge 107 | day_load_energy_84: sensor.deyeinvertermaster_summary_day_load 108 | day_grid_import_76: sensor.deyeinvertermaster_summary_day_grid_import_buy 109 | day_grid_export_77: sensor.deyeinvertermaster_summary_day_grid_export_sell 110 | day_pv_energy_108: sensor.deyeinvertermaster_summary_day_pv 111 | inverter_voltage_154: sensor.deyeinvertermaster_grid_voltage_l1 112 | load_frequency_192: sensor.deyeinvertermaster_grid_frequency 113 | inverter_current_164: sensor.deyeinvertermaster_inverter_output_current_l1 114 | inverter_power_175: sensor.deyeinvertermaster_inverter_output_power 115 | grid_power_169: sensor.deyeinvertermaster_grid_load_l1 116 | radiator_temp_91: sensor.deyeinvertermaster_temperature_ac_transformer 117 | dc_transformer_temp_90: sensor.deyeinvertermaster_temperature_dc_transformer 118 | pv1_power_186: sensor.deyeinvertermaster_pv1_power 119 | pv2_power_187: sensor.deyeinvertermaster_pv2_power 120 | pv3_power_188: sensor.deyeinvertermaster_pv3_power 121 | pv4_power_189: sensor.deyeinvertermaster_pv4_power 122 | battery_voltage_183: sensor.deyeinvertermaster_battery_voltage 123 | battery_soc_184: sensor.deyeinvertermaster_battery_soc 124 | battery_power_190: sensor.deyeinvertermaster_battery_output_power 125 | battery_current_191: sensor.deyeinvertermaster_battery_output_current 126 | battery_temp_182: sensor.deyeinvertermaster_battery_temperature 127 | grid_ct_power_172: sensor.deyeinvertermaster_grid_power_ct_clamp 128 | pv1_voltage_109: sensor.deyeinvertermaster_pv1_voltage 129 | pv1_current_110: sensor.deyeinvertermaster_pv1_current 130 | pv2_voltage_111: sensor.deyeinvertermaster_pv2_voltage 131 | pv2_current_112: sensor.deyeinvertermaster_pv2_current 132 | pv3_voltage_113: sensor.deyeinvertermaster_pv3_voltage 133 | pv3_current_114: sensor.deyeinvertermaster_pv3_current 134 | pv4_voltage_115: sensor.deyeinvertermaster_pv4_voltage 135 | pv4_current_116: sensor.deyeinvertermaster_pv4_current 136 | grid_connected_status_194: binary_sensor.deyeinvertermaster_grid_connected_status 137 | inverter_status_59: sensor.deyeinvertercmaster_inverter_system_state 138 | aux_power_166: sensor.deyeinvertermaster_generator_port_power 139 | day_aux_energy: sensor.deyeinvertermaster_summary_day_generator 140 | remaining_solar: sensor.energy_production_today_remaining 141 | solar_sell_247: switch.deyeinvertermaster_export_solar_enabled 142 | decimal_places: 2 143 | show_battery: true 144 | - type: custom:apexcharts-card 145 | show: 146 | loading: false 147 | header: 148 | title: Electricity tariffs with Octopus Flux Import 149 | show: true 150 | show_states: true 151 | colorize_states: true 152 | span: 153 | start: day 154 | graph_span: 24h 155 | update_interval: 1mins 156 | all_series_config: 157 | type: line 158 | float_precision: 4 159 | extend_to: now 160 | stroke_width: 2 161 | fill_raw: 'null' 162 | now: 163 | show: true 164 | color: '#ff0000' 165 | label: Now 166 | series: 167 | - entity: >- 168 | event.octopus_energy_electricity_ZZZZZZZZZZ_AAAAAAAAAAAAA_current_day_rates 169 | yaxis_id: graph_display 170 | name: Import today 171 | curve: stepline 172 | color: blue 173 | show: 174 | legend_value: false 175 | in_header: false 176 | in_chart: true 177 | data_generator: | 178 | return entity.attributes.rates.map((entry) => { 179 | return [new Date(entry.start), entry.value_inc_vat]; 180 | }); 181 | - entity: >- 182 | event.octopus_energy_electricity_ZZZZZZZZZZ_AAAAAAAAAAAAA_next_day_rates 183 | yaxis_id: graph_display 184 | name: Import tomorrow 185 | color: blue 186 | curve: stepline 187 | data_generator: | 188 | return entity.attributes.rates.map((entry) => { 189 | return [new Date(entry.start), entry.value_inc_vat]; 190 | }); 191 | show: 192 | legend_value: false 193 | in_header: false 194 | in_chart: true 195 | - entity: >- 196 | event.octopus_energy_electricity_ZZZZZZZZZZ_BBBBBBBBBBBBB_export_current_day_rates 197 | yaxis_id: graph_display 198 | name: Export today 199 | color: orange 200 | curve: stepline 201 | data_generator: | 202 | return entity.attributes.rates.map((entry) => { 203 | return [new Date(entry.start), entry.value_inc_vat]; 204 | }); 205 | show: 206 | legend_value: false 207 | in_header: false 208 | in_chart: true 209 | - entity: >- 210 | event.octopus_energy_electricity_ZZZZZZZZZZ_BBBBBBBBBBBBB_export_next_day_rates 211 | yaxis_id: graph_display 212 | name: Export tomorrow 213 | color: orange 214 | curve: stepline 215 | data_generator: | 216 | return entity.attributes.rates.map((entry) => { 217 | return [new Date(entry.start), entry.value_inc_vat]; 218 | }); 219 | show: 220 | legend_value: false 221 | in_header: false 222 | in_chart: true 223 | - entity: >- 224 | sensor.octopus_energy_electricity_ZZZZZZZZZZ_AAAAAAAAAAAAA_current_rate 225 | yaxis_id: header_only 226 | name: Import Rate 227 | color: Blue 228 | show: 229 | legend_value: true 230 | in_header: true 231 | in_chart: false 232 | - entity: >- 233 | sensor.octopus_energy_electricity_ZZZZZZZZZZ_BBBBBBBBBBBBB_export_current_rate 234 | yaxis_id: header_only 235 | name: Export Rate 236 | color: Orange 237 | show: 238 | legend_value: true 239 | in_header: true 240 | in_chart: false 241 | yaxis: 242 | - id: graph_display 243 | min: 0 244 | max: '| +0.1 |' 245 | decimals: 0 246 | apex_config: 247 | tickAmount: 4 248 | labels: 249 | formatter: | 250 | EVAL:function (val) { 251 | return "£" + val.toFixed(2); 252 | } 253 | forceNiceScale: true 254 | - id: header_only 255 | show: false 256 | apex_config: 257 | tooltip: 258 | x: 259 | format: ddd dd MMM - HH:mm 260 | xaxis: 261 | axisBorder: 262 | show: false 263 | tooltip: 264 | enabled: false 265 | grid: 266 | borderColor: '#7B7B7B' 267 | legend: 268 | show: true 269 | toolbar: 270 | show: false 271 | autoSelected: zoom 272 | tools: 273 | zoom: false 274 | zoomin: false 275 | zoomout: false 276 | pan: false 277 | reset: true 278 | annotations: 279 | xaxis: 280 | - x: ${ new Date().setHours(24,0,0,0) } 281 | label: 282 | text: Tomorrow 283 | - x: ${Date.now()} 284 | label: 285 | text: Now 286 | borderColor: '#00E396' 287 | style: 288 | color: '#fff' 289 | background: '#00E396' 290 | borderWidth: 0 291 | yaxis: 292 | min: ~0 293 | max: ~1.0 294 | tickAmount: 4 295 | chart: 296 | height: 400 297 | foreColor: '#7B7B7B' 298 | zoom: 299 | type: x 300 | enabled: false 301 | autoScaleYaxis: true 302 | - theme: Backend-selected 303 | title: Time Of Use 2 304 | type: custom:grid-layout 305 | layout: {} 306 | badges: [] 307 | cards: 308 | - type: horizontal-stack 309 | cards: 310 | - type: horizontal-stack 311 | cards: 312 | - type: entities 313 | entities: 314 | - entity: input_datetime.timezone1_time 315 | name: From 316 | - type: horizontal-stack 317 | cards: 318 | - type: entities 319 | entities: 320 | - entity: input_datetime.timezone2_time 321 | name: To 322 | - type: horizontal-stack 323 | cards: 324 | - type: entities 325 | entities: 326 | - entity: number.deyeinvertermaster_timezone1_power 327 | name: Power 328 | mode: box 329 | - type: horizontal-stack 330 | cards: 331 | - type: entities 332 | entities: 333 | - entity: number.deyeinvertermaster_timezone1_soc 334 | name: SoC 335 | mode: box 336 | - type: horizontal-stack 337 | cards: 338 | - type: entities 339 | entities: 340 | - entity: select.deyeinvertermaster_timezone1_charge 341 | name: Charge 342 | view_layout: 343 | grid-area: 2 344 | - type: horizontal-stack 345 | cards: 346 | - type: horizontal-stack 347 | cards: 348 | - type: entities 349 | entities: 350 | - entity: input_datetime.timezone2_time 351 | name: From 352 | - type: horizontal-stack 353 | cards: 354 | - type: entities 355 | entities: 356 | - entity: input_datetime.timezone3_time 357 | name: To 358 | - type: horizontal-stack 359 | cards: 360 | - type: entities 361 | entities: 362 | - entity: number.deyeinvertermaster_timezone2_power 363 | name: Power 364 | mode: box 365 | - type: horizontal-stack 366 | cards: 367 | - type: entities 368 | entities: 369 | - entity: number.deyeinvertermaster_timezone2_soc 370 | name: SoC 371 | mode: box 372 | - type: horizontal-stack 373 | cards: 374 | - type: entities 375 | entities: 376 | - entity: select.deyeinvertermaster_timezone2_charge 377 | name: Charge 378 | view_layout: 379 | grid-area: 3 380 | - type: horizontal-stack 381 | cards: 382 | - type: horizontal-stack 383 | cards: 384 | - type: entities 385 | entities: 386 | - entity: input_datetime.timezone3_time 387 | name: From 388 | - type: horizontal-stack 389 | cards: 390 | - type: entities 391 | entities: 392 | - entity: input_datetime.timezone4_time 393 | name: To 394 | - type: horizontal-stack 395 | cards: 396 | - type: entities 397 | entities: 398 | - entity: number.deyeinvertermaster_timezone3_power 399 | name: Power 400 | mode: box 401 | - type: horizontal-stack 402 | cards: 403 | - type: entities 404 | entities: 405 | - entity: number.deyeinvertermaster_timezone3_soc 406 | name: SoC 407 | mode: box 408 | - type: horizontal-stack 409 | cards: 410 | - type: entities 411 | entities: 412 | - entity: select.deyeinvertermaster_timezone3_charge 413 | name: Charge 414 | view_layout: 415 | grid-area: 4 416 | - type: horizontal-stack 417 | cards: 418 | - type: horizontal-stack 419 | cards: 420 | - type: entities 421 | entities: 422 | - entity: input_datetime.timezone4_time 423 | name: From 424 | - type: horizontal-stack 425 | cards: 426 | - type: entities 427 | entities: 428 | - entity: input_datetime.timezone5_time 429 | name: To 430 | - type: horizontal-stack 431 | cards: 432 | - type: entities 433 | entities: 434 | - entity: number.deyeinvertermaster_timezone4_power 435 | name: Power 436 | mode: box 437 | - type: horizontal-stack 438 | cards: 439 | - type: entities 440 | entities: 441 | - entity: number.deyeinvertermaster_timezone4_soc 442 | name: SoC 443 | mode: box 444 | - type: horizontal-stack 445 | cards: 446 | - type: entities 447 | entities: 448 | - entity: select.deyeinvertermaster_timezone4_charge 449 | name: Charge 450 | view_layout: 451 | grid-area: 5 452 | - type: horizontal-stack 453 | cards: 454 | - type: horizontal-stack 455 | cards: 456 | - type: entities 457 | entities: 458 | - entity: input_datetime.timezone5_time 459 | name: From 460 | - type: horizontal-stack 461 | cards: 462 | - type: entities 463 | entities: 464 | - entity: input_datetime.timezone6_time 465 | name: To 466 | - type: horizontal-stack 467 | cards: 468 | - type: entities 469 | entities: 470 | - entity: number.deyeinvertermaster_timezone5_power 471 | name: Power 472 | mode: box 473 | - type: horizontal-stack 474 | cards: 475 | - type: entities 476 | entities: 477 | - entity: number.deyeinvertermaster_timezone5_soc 478 | name: SoC 479 | mode: box 480 | - type: horizontal-stack 481 | cards: 482 | - type: entities 483 | entities: 484 | - entity: select.deyeinvertermaster_timezone5_charge 485 | name: Charge 486 | view_layout: 487 | grid-area: 6 488 | - type: horizontal-stack 489 | cards: 490 | - type: horizontal-stack 491 | cards: 492 | - type: entities 493 | entities: 494 | - entity: input_datetime.timezone6_time 495 | name: From 496 | - type: horizontal-stack 497 | cards: 498 | - type: entities 499 | entities: 500 | - entity: input_datetime.timezone1_time 501 | name: To 502 | - type: horizontal-stack 503 | cards: 504 | - type: entities 505 | entities: 506 | - entity: number.deyeinvertermaster_timezone6_power 507 | name: Power 508 | mode: box 509 | - type: horizontal-stack 510 | cards: 511 | - type: entities 512 | entities: 513 | - entity: number.deyeinvertermaster_timezone6_soc 514 | name: SoC 515 | mode: box 516 | - type: horizontal-stack 517 | cards: 518 | - type: entities 519 | entities: 520 | - entity: select.deyeinvertermaster_timezone6_charge 521 | name: Charge 522 | view_layout: 523 | grid-area: 7 524 | - type: horizontal-stack 525 | cards: 526 | - type: horizontal-stack 527 | cards: 528 | - type: entities 529 | entities: 530 | - entity: switch.deyeinvertermaster_time_of_use 531 | - title: Graphs 532 | path: graphs 533 | icon: mdi:chart-line 534 | cards: 535 | - type: custom:plotly-graph 536 | entities: 537 | - entity: number.deyeinvertermaster_grid_charge_current 538 | - entity: sensor.deyeinvertermaster_battery_soc 539 | - entity: sensor.deyeinvertermaster_battery_output_current 540 | refresh_interval: 10 541 | title: Grid Charge / SOC 542 | hours_to_show: 24 543 | max_y_axis: 110 544 | min_y_axis: 0 545 | -------------------------------------------------------------------------------- /packages/polish_tge.yaml: -------------------------------------------------------------------------------- 1 | template: 2 | - sensor: 3 | - name: "Suggested Cheap Price" 4 | unique_id: "suggested_cheap_price" 5 | unit_of_measurement: "zl/MWh" 6 | state: > 7 | {% set current_hour = now().hour %} 8 | {% set prices_today = state_attr('sensor.tge_fixing_1_rate', 'prices_today') %} 9 | {% set prices_tomorrow = state_attr('sensor.tge_fixing_1_rate', 'prices_tomorrow') %} 10 | {% set tomorrow_valid = True %} 11 | 12 | {# Combine today and tomorrow prices, ignoring past hours #} 13 | {% set future_prices = prices_today[current_hour:] + (prices_tomorrow if tomorrow_valid else []) %} 14 | {% set number_prices = future_prices | count %} 15 | 16 | {% if number_prices <= 22 %} 17 | {# if future prices are not available just use the lowest of all prices we have #} 18 | {% set future_prices = prices_today + (prices_tomorrow if tomorrow_valid else []) %} 19 | {% endif %} 20 | 21 | {# Extract only the 'value' key from each dictionary #} 22 | {% set future_values = future_prices | map(attribute='price') | list %} 23 | 24 | {# Sort the extracted values #} 25 | {% set sorted_values = future_values | sort %} 26 | 27 | {# Take the lowest X values and find the maximum #} 28 | {% set lowest_prices = sorted_values[:3] %} 29 | {% set suggested_price = lowest_prices | max %} 30 | {{ suggested_price | round(3) }} 31 | availability: > 32 | {{ states('sensor.tge_fixing_1_rate') != 'unavailable' }} 33 | 34 | - name: "Energy Provider Actual Price" 35 | unique_id: "energy_provider_actual_price" 36 | unit_of_measurement: "zl/MWh" 37 | state: > 38 | {{ states('sensor.tge_fixing_1_rate') | float(2) | round(3) }} 39 | availability: > 40 | {{ states('sensor.tge_fixing_1_rate') != 'unavailable' }} 41 | 42 | input_number: 43 | charge_below_price: 44 | name: Charge battery below price 45 | min: -1000.0 46 | max: 1000.0 47 | step: 50.0 48 | mode: box 49 | 50 | discharge_above_price: 51 | name: Discharge battery above price 52 | min: -1000.0 53 | max: 9000.0 54 | step: 50.0 55 | mode: box 56 | 57 | charge_battery_target_percentage: 58 | name: Charge Battery Target 59 | min: 0.0 60 | max: 100.0 61 | step: 1.0 62 | mode: box 63 | unit_of_measurement: "%" 64 | 65 | input_boolean: 66 | charge_battery_switch: 67 | name: Triggers Battery Charging 68 | 69 | discharge_battery_switch: 70 | name: Triggers Battery Discharging 71 | 72 | charge_automation_enable: 73 | name: Enable Charging 74 | 75 | discharge_automation_enable: 76 | name: Enable Discharging 77 | 78 | -------------------------------------------------------------------------------- /packages/polish_tge_automations.yaml: -------------------------------------------------------------------------------- 1 | - id: '1708977359107' 2 | alias: 'Monitor Charge price automation ' 3 | description: '' 4 | triggers: 5 | - entity_id: 6 | - sensor.tge_fixing_1_rate 7 | trigger: state 8 | - entity_id: 9 | - input_number.charge_below_price 10 | trigger: state 11 | - entity_id: 12 | - input_number.discharge_above_price 13 | trigger: state 14 | conditions: [] 15 | actions: 16 | - choose: 17 | - conditions: 18 | - condition: template 19 | value_template: '{{ (states("sensor.tge_fixing_1_rate") | float(1)) <= (states("input_number.charge_below_price") 20 | | float(1))}}' 21 | sequence: 22 | - action: input_boolean.turn_on 23 | metadata: {} 24 | data: {} 25 | target: 26 | entity_id: input_boolean.charge_battery_switch 27 | - conditions: 28 | - condition: template 29 | value_template: '{{ (states("sensor.tge_fixing_1_rate") | float(1)) > (states("input_number.charge_below_price") 30 | | float(1))}}' 31 | sequence: 32 | - action: input_boolean.turn_off 33 | target: 34 | entity_id: input_boolean.charge_battery_switch 35 | data: {} 36 | mode: single 37 | - id: '1709319682608' 38 | alias: Discharge Settings Change 39 | description: '' 40 | triggers: 41 | - entity_id: 42 | - input_boolean.discharge_battery_switch 43 | from: 'off' 44 | to: 'on' 45 | id: Enable Discharge 46 | trigger: state 47 | - entity_id: 48 | - input_boolean.discharge_battery_switch 49 | id: Disable Discharge 50 | from: 'on' 51 | to: 'off' 52 | trigger: state 53 | conditions: 54 | - condition: state 55 | entity_id: input_boolean.discharge_automation_enable 56 | state: 'on' 57 | actions: 58 | - choose: 59 | - conditions: 60 | - condition: trigger 61 | id: 62 | - Enable Discharge 63 | sequence: 64 | - action: switch.turn_on 65 | metadata: {} 66 | data: {} 67 | target: 68 | entity_id: switch.deyeinvertermaster_time_of_use 69 | enabled: false 70 | - action: select.select_option 71 | metadata: {} 72 | data: 73 | option: Allow Export 74 | target: 75 | entity_id: select.deyeinvertermaster_load_limit_exp_ess_non_ess 76 | - action: scene.create 77 | metadata: {} 78 | data: 79 | snapshot_entities: 80 | - number.deyeinvertermaster_timezone1_soc 81 | - number.deyeinvertermaster_timezone2_soc 82 | - number.deyeinvertermaster_timezone3_soc 83 | - number.deyeinvertermaster_timezone4_soc 84 | - number.deyeinvertermaster_timezone5_soc 85 | - number.deyeinvertermaster_timezone6_soc 86 | scene_id: normal_settings 87 | - action: number.set_value 88 | metadata: {} 89 | data: 90 | value: '50' 91 | target: 92 | entity_id: 93 | - number.deyeinvertermaster_timezone1_soc 94 | - number.deyeinvertermaster_timezone2_soc 95 | - number.deyeinvertermaster_timezone3_soc 96 | - number.deyeinvertermaster_timezone4_soc 97 | - number.deyeinvertermaster_timezone5_soc 98 | - number.deyeinvertermaster_timezone6_soc 99 | - conditions: 100 | - condition: trigger 101 | id: 102 | - Disable Discharge 103 | sequence: 104 | - action: switch.turn_off 105 | metadata: {} 106 | data: {} 107 | target: 108 | entity_id: switch.deyeinvertermaster_time_of_use 109 | enabled: false 110 | - action: select.select_option 111 | metadata: {} 112 | data: 113 | option: Zero Export 114 | target: 115 | entity_id: select.deyeinvertermaster_load_limit_exp_ess_non_ess 116 | - metadata: {} 117 | target: 118 | entity_id: scene.normal_settings 119 | action: scene.turn_on 120 | mode: single 121 | - id: '1709319936727' 122 | alias: Charge Settings Change 123 | description: '' 124 | triggers: 125 | - entity_id: 126 | - input_boolean.charge_battery_switch 127 | from: 'off' 128 | to: 'on' 129 | id: Enable Charge from Grid 130 | trigger: state 131 | - entity_id: 132 | - input_boolean.charge_battery_switch 133 | from: 'on' 134 | to: 'off' 135 | id: Disable Charge from Grid 136 | trigger: state 137 | conditions: 138 | - condition: state 139 | entity_id: input_boolean.charge_automation_enable 140 | state: 'on' 141 | actions: 142 | - choose: 143 | - conditions: 144 | - condition: trigger 145 | id: 146 | - Enable Charge from Grid 147 | sequence: 148 | - action: switch.turn_on 149 | metadata: {} 150 | data: {} 151 | target: 152 | entity_id: switch.deyeinvertermaster_battery_grid_charge_enabled 153 | - action: switch.turn_off 154 | metadata: {} 155 | data: {} 156 | target: 157 | entity_id: switch.deyeinvertermaster_time_of_use 158 | enabled: false 159 | - action: scene.create 160 | metadata: {} 161 | data: 162 | scene_id: before_battery_charge 163 | snapshot_entities: 164 | - select.deyeinvertermaster_timezone1_charge 165 | - select.deyeinvertermaster_timezone2_charge 166 | - select.deyeinvertermaster_timezone3_charge 167 | - select.deyeinvertermaster_timezone4_charge 168 | - select.deyeinvertermaster_timezone5_charge 169 | - select.deyeinvertermaster_timezone6_charge 170 | - number.deyeinvertermaster_timezone1_soc 171 | - number.deyeinvertermaster_timezone2_soc 172 | - number.deyeinvertermaster_timezone3_soc 173 | - number.deyeinvertermaster_timezone4_soc 174 | - number.deyeinvertermaster_timezone5_soc 175 | - number.deyeinvertermaster_timezone6_soc 176 | enabled: true 177 | - action: select.select_option 178 | metadata: {} 179 | data: 180 | option: Grid 181 | target: 182 | entity_id: 183 | - select.deyeinvertermaster_timezone1_charge 184 | - select.deyeinvertermaster_timezone2_charge 185 | - select.deyeinvertermaster_timezone3_charge 186 | - select.deyeinvertermaster_timezone4_charge 187 | - select.deyeinvertermaster_timezone5_charge 188 | - select.deyeinvertermaster_timezone6_charge 189 | enabled: true 190 | - action: number.set_value 191 | metadata: {} 192 | data: 193 | value: '{{ states("input_number.charge_battery_target_percentage") }}' 194 | target: 195 | entity_id: 196 | - number.deyeinvertermaster_timezone1_soc 197 | - number.deyeinvertermaster_timezone2_soc 198 | - number.deyeinvertermaster_timezone3_soc 199 | - number.deyeinvertermaster_timezone4_soc 200 | - number.deyeinvertermaster_timezone5_soc 201 | - number.deyeinvertermaster_timezone6_soc 202 | enabled: true 203 | - conditions: 204 | - condition: trigger 205 | id: 206 | - Disable Charge from Grid 207 | sequence: 208 | - action: switch.turn_off 209 | metadata: {} 210 | data: {} 211 | target: 212 | entity_id: switch.deyeinvertermaster_battery_grid_charge_enabled 213 | enabled: true 214 | - action: switch.turn_on 215 | metadata: {} 216 | data: {} 217 | target: 218 | entity_id: switch.deyeinvertermaster_time_of_use 219 | enabled: false 220 | - action: scene.turn_on 221 | metadata: {} 222 | target: 223 | entity_id: scene.before_battery_charge 224 | enabled: true 225 | mode: single 226 | - id: '1709538239920' 227 | alias: Monitor Discharge price Automation 228 | description: '' 229 | triggers: 230 | - entity_id: 231 | - sensor.tge_fixing_1_rate 232 | trigger: state 233 | - entity_id: 234 | - input_number.charge_below_price 235 | trigger: state 236 | - entity_id: 237 | - input_number.discharge_above_price 238 | trigger: state 239 | conditions: [] 240 | actions: 241 | - choose: 242 | - conditions: 243 | - condition: template 244 | value_template: '{{ states("sensor.tge_fixing_1_rate") >= states("input_number.discharge_above_price")}}' 245 | sequence: 246 | - action: input_boolean.turn_on 247 | target: 248 | entity_id: input_boolean.discharge_battery_switch 249 | data: {} 250 | - conditions: 251 | - condition: template 252 | value_template: '{{ states("sensor.tge_fixing_1_rate") < states("input_number.discharge_above_price")}}' 253 | sequence: 254 | - action: input_boolean.turn_off 255 | target: 256 | entity_id: input_boolean.discharge_battery_switch 257 | data: {} 258 | mode: single 259 | - id: '1736266366952' 260 | alias: Automatically Update Charge Price 261 | description: Automate the price so you do not need to monitor prices 262 | triggers: 263 | - trigger: state 264 | entity_id: 265 | - sensor.suggested_cheap_price 266 | - trigger: state 267 | entity_id: 268 | - automation.automatically_update_charge_price 269 | from: 'off' 270 | to: 'on' 271 | conditions: [] 272 | actions: 273 | - action: input_number.set_value 274 | metadata: {} 275 | data: 276 | value: '{{ states("sensor.suggested_cheap_price") }}' 277 | target: 278 | entity_id: input_number.charge_below_price 279 | mode: single 280 | -------------------------------------------------------------------------------- /packages/polish_tge_dashboard.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - title: Home 3 | cards: 4 | - type: entities 5 | entities: 6 | - entity: input_boolean.charge_automation_enable 7 | name: Enable Charging System 8 | - entity: sensor.energy_provider_actual_price 9 | - entity: sensor.suggested_cheap_price 10 | - entity: input_number.charge_below_price 11 | name: Charge on/below price 12 | - entity: input_boolean.charge_battery_switch 13 | - entity: number.deyeinvertermaster_grid_charge_current 14 | - entity: input_number.charge_battery_target_percentage 15 | - entity: switch.deyeinvertermaster_battery_grid_charge_enabled 16 | - entity: automation.charge_settings_change 17 | - entity: automation.automatically_update_charge_price 18 | title: Charge 19 | show_header_toggle: false 20 | - type: entities 21 | entities: 22 | - entity: input_boolean.discharge_automation_enable 23 | name: Enable Discharging System 24 | - entity: input_number.discharge_above_price 25 | name: Discharge on/above price 26 | - entity: input_boolean.discharge_battery_switch 27 | - entity: number.deyeinvertermaster_export_limit 28 | - entity: select.deyeinvertermaster_load_limit_exp_ess_non_ess 29 | - entity: automation.discharge_settings_change 30 | title: Discharge 31 | show_header_toggle: false 32 | - type: history-graph 33 | entities: 34 | - entity: input_boolean.discharge_battery_switch 35 | - entity: input_boolean.charge_battery_switch 36 | - entity: sensor.energy_provider_actual_price 37 | - entity: sensor.suggested_cheap_price 38 | title: Debug State 39 | - type: markdown 40 | content: " ## System Timer Settings\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Time Slot\n \n Power\n \n Bat SOC\n \n\tCharge\n\t
\n {{state_attr('input_datetime.timezone1_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone2_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone1_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone1_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone1_charge')}}\n\t
\n {{state_attr('input_datetime.timezone2_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone3_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone2_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone2_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone2_charge')}}\n\t
\n {{state_attr('input_datetime.timezone3_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone4_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone3_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone3_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone3_charge')}}\n\t
\n {{state_attr('input_datetime.timezone4_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone5_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone4_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone4_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone4_charge')}}\n\t
\n {{state_attr('input_datetime.timezone5_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone6_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone5_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone5_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone5_charge')}}\n\t
\n {{state_attr('input_datetime.timezone6_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}} - {{state_attr('input_datetime.timezone1_time', 'timestamp') | timestamp_custom(\"%H:%M\", false)}}\n \n {{ states('number.deyeinvertermaster_timezone6_power') }}W\n \n {{ states('number.deyeinvertermaster_timezone6_soc') }} %\n \n\t{{states('select.deyeinvertermaster_timezone6_charge')}}\n\t
" 41 | title: Timer 42 | - type: custom:sunsynk-power-flow-card 43 | cardstyle: lite 44 | show_solar: true 45 | card_height: 410px 46 | show_grid: true 47 | solar: 48 | mppts: 1 49 | display_mode: 2 50 | colour: orange 51 | show_daily: true 52 | animation_speed: 6 53 | max_power: 50000 54 | auto_scale: true 55 | inverter: 56 | modern: true 57 | colour: grey 58 | battery: 59 | energy: 138000 60 | shutdown_soc: 8 61 | invert_power: false 62 | colour: green 63 | show_daily: true 64 | animation_speed: 6 65 | max_power: 50000 66 | load: 67 | colour: '#5fb6ad' 68 | show_daily: true 69 | show_aux: false 70 | animation_speed: 4 71 | max_power: 40000 72 | grid: 73 | colour: '#5490c2' 74 | show_daily_buy: true 75 | show_daily_sell: true 76 | no_grid_colour: red 77 | show_nonessential: true 78 | animation_speed: 9 79 | max_power: 6000 80 | entities: 81 | use_timer_248: switch.deyeinvertermaster_time_of_use 82 | priority_load_243: sensor.deyeinvertermaster_priority_charge_or_load 83 | day_battery_charge_70: sensor.deyeinvertermaster_summary_day_battery_charge 84 | day_battery_discharge_71: sensor.deyeinvertermaster_summary_day_battery_discharge 85 | day_load_energy_84: sensor.deyeinvertermaster_summary_day_load 86 | day_grid_import_76: sensor.deyeinvertermaster_summary_day_grid_import_buy 87 | day_grid_export_77: sensor.deyeinvertermaster_summary_day_grid_export_sell 88 | day_pv_energy_108: sensor.deyeinvertermaster_summary_day_pv 89 | inverter_voltage_154: sensor.deyeinvertermaster_grid_voltage_l1 90 | load_frequency_192: sensor.deyeinvertermaster_grid_frequency 91 | inverter_current_164: sensor.deyeinvertermaster_inverter_output_current_l1 92 | inverter_power_175: sensor.deyeinvertermaster_inverter_output_power 93 | grid_power_169: sensor.deyeinvertermaster_grid_load 94 | radiator_temp_91: sensor.deyeinvertermaster_temperature_ac_transformer 95 | dc_transformer_temp_90: sensor.deyeinvertermaster_temperature_dc_transformer 96 | pv1_power_186: sensor.deyeinvertermaster_pv1_power 97 | pv2_power_187: sensor.deyeinvertermaster_pv2_power 98 | pv3_power_188: sensor.deyeinvertermaster_pv3_power 99 | pv4_power_189: sensor.deyeinvertermaster_pv4_power 100 | battery_voltage_183: sensor.deyeinvertermaster_battery_voltage 101 | battery_soc_184: sensor.deyeinvertermaster_battery_soc 102 | battery_power_190: sensor.deyeinvertermaster_battery_output_power 103 | battery_current_191: sensor.deyeinvertermaster_battery_output_current 104 | battery_temp_182: sensor.deyeinvertermaster_battery_temperature 105 | grid_ct_power_172: sensor.deyeinvertermaster_grid_power_ct_clamp 106 | pv1_voltage_109: sensor.deyeinvertermaster_pv1_voltage 107 | pv1_current_110: sensor.deyeinvertermaster_pv1_current 108 | pv2_voltage_111: sensor.deyeinvertermaster_pv2_voltage 109 | pv2_current_112: sensor.deyeinvertermaster_pv2_current 110 | pv3_voltage_113: sensor.deyeinvertermaster_pv3_voltage 111 | pv3_current_114: sensor.deyeinvertermaster_pv3_current 112 | pv4_voltage_115: sensor.deyeinvertermaster_pv4_voltage 113 | pv4_current_116: sensor.deyeinvertermaster_pv4_current 114 | grid_connected_status_194: binary_sensor.deyeinvertermaster_grid_connected_status 115 | inverter_status_59: sensor.deyeinvertermaster_inverter_system_state 116 | aux_power_166: sensor.deyeinvertermaster_aux_output_power 117 | remaining_solar: sensor.energy_production_today 118 | solar_sell_247: switch.deyeinvertermaster_export_solar_enabled 119 | decimal_places: 1 120 | - type: custom:apexcharts-card 121 | hours_12: false 122 | header: 123 | show: true 124 | title: Energy Prices 125 | show_states: true 126 | now: 127 | show: true 128 | color: '#ff0000' 129 | label: Now 130 | graph_span: 2d 131 | span: 132 | start: day 133 | series: 134 | - entity: sensor.tge_fixing_1_rate 135 | name: Today 136 | unit: zl/MWh 137 | data_generator: | 138 | return entity.attributes.prices_today.map((val, index) => { 139 | return [new Date(val['time']), val['price']]; 140 | }); 141 | type: column 142 | show: 143 | legend_value: false 144 | in_header: false 145 | - entity: sensor.tge_fixing_1_rate 146 | name: Tomorrow 147 | unit: zl/MWh 148 | data_generator: | 149 | return entity.attributes.prices_tomorrow.map((val, index) => { 150 | return [new Date(val['time']), val['price']]; 151 | }); 152 | type: column 153 | show: 154 | legend_value: false 155 | in_header: false 156 | 157 | -------------------------------------------------------------------------------- /packages/prepaidmeter.yaml: -------------------------------------------------------------------------------- 1 | template: 2 | - sensor: 3 | - name: "Prepaid units left" 4 | unit_of_measurement: "kWh" 5 | state: > 6 | {% set units = states('input_number.prepaid_meter_units') | float(1) %} 7 | {% set currentTotal = (states('sensor.deyeinvertermaster_summary_total_grid_import_buy') | float(6)) * 1000.0 %} 8 | {% set totalWhenRecharged = states('input_number.prepaid_meter_inverter_total_units') | float(2) %} 9 | {% set totalUsed = currentTotal - totalWhenRecharged %} 10 | {{ (units - totalUsed ) | round(2)}} 11 | 12 | input_number: 13 | prepaid_meter_units: 14 | name: Prepaid meter Recharge Units 15 | min: 0.01 16 | max: 10000.01 17 | step: 1 18 | mode: box 19 | 20 | prepaid_meter_inverter_total_units: 21 | name: Prepaid meter Inverter Reading 22 | min: 0.01 23 | max: 1000000.01 24 | mode: box 25 | -------------------------------------------------------------------------------- /packages/prepaidmeter_automations.yaml: -------------------------------------------------------------------------------- 1 | - id: '1717429630744' 2 | alias: Prepaid meter recharge 3 | description: '' 4 | trigger: 5 | - platform: state 6 | entity_id: 7 | - input_number.prepaid_meter_units 8 | condition: 9 | - condition: template 10 | value_template: '{{ states(''input_number.prepaid_meter_units'') | float > 0 }}' 11 | actions: 12 | - action: input_number.set_value 13 | metadata: {} 14 | data: 15 | value: '{{ ((states(''sensor.deyeinvertermaster_summary_total_grid_import_buy'') | 16 | float(6)) * 1000.0) }}' 17 | target: 18 | entity_id: input_number.prepaid_meter_inverter_total_units 19 | mode: single 20 | -------------------------------------------------------------------------------- /packages/prepaidmeter_dashboard.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - title: Home 3 | cards: 4 | - type: entities 5 | entities: 6 | - entity: input_number.prepaid_meter_units 7 | - entity: automation.prepaid_meter_recharge 8 | - type: glance 9 | entities: 10 | - entity: input_number.prepaid_meter_inverter_total_units 11 | - entity: sensor.prepaid_units_left 12 | -------------------------------------------------------------------------------- /packages/smartdeyedongle.yaml: -------------------------------------------------------------------------------- 1 | #These entries below define data fields to store the TimeOfUse values on home_assistant side 2 | #The automation will take a change in value and populate the value on the inverter accordingly 3 | input_datetime: 4 | timezone1_time: 5 | name: Timezone 1 Time 6 | has_date: false 7 | has_time: true 8 | timezone2_time: 9 | name: Timezone 2 Time 10 | has_date: false 11 | has_time: true 12 | timezone3_time: 13 | name: Timezone 3 Time 14 | has_date: false 15 | has_time: true 16 | timezone4_time: 17 | name: Timezone 4 Time 18 | has_date: false 19 | has_time: true 20 | timezone5_time: 21 | name: Timezone 5 Time 22 | has_date: false 23 | has_time: true 24 | timezone6_time: 25 | name: Timezone 6 Time 26 | has_date: false 27 | has_time: true 28 | 29 | template: 30 | - sensor: 31 | - name: "deyeinvertermaster_solar_power_used" 32 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') | float(1) - states('sensor.deyeinvertermaster_solar_power_battery_charge') | float(1)) |round(1) }}" 33 | unit_of_measurement: "kWh" 34 | device_class: energy 35 | state_class: total_increasing 36 | 37 | - name: "deyeinvertermaster_solar_power_battery_charge" 38 | state: "{{ ( states('sensor.deyeinvertermaster_summary_day_battery_charge') | float(1) - states('sensor.deyeinvertermaster_summary_day_battery_charge_grid') | float(1)) | round(1) }}" 39 | unit_of_measurement: "kWh" 40 | device_class: energy 41 | state_class: total_increasing 42 | 43 | #essential = inverter_power_175 + grid_power_169 - aux_power_166 44 | - name: "deyeinvertermaster_essential_load" 45 | state: "{{ (states('sensor.deyeinvertermaster_inverter_output_power') |float(0) + (states('sensor.deyeinvertermaster_grid_load_l1') |float(0) - states('sensor.deyeinvertermaster_aux_output_power') |float(0) )) | round(0)}}" 46 | unit_of_measurement: "W" 47 | device_class: power 48 | state_class: measurement 49 | 50 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 51 | - name: "deyeinvertermaster_non_essential_load" 52 | state: "{{ (states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinvertermaster_grid_load_l1') |float(0))) | round(0)}}" 53 | unit_of_measurement: "W" 54 | device_class: power 55 | state_class: measurement 56 | 57 | - name: "deyeinvertermaster_priority_charge_or_load" 58 | state: | 59 | {% if is_state('select.deyeinvertermaster_energy_management_model', 'Battery Priority Mode') %} 60 | off 61 | {% else %} 62 | on 63 | {% endif %} 64 | 65 | - name: deyeinvertermaster_battery_charge_grid_power 66 | unit_of_measurement: "kW" 67 | state_class: measurement 68 | device_class: power 69 | state: >- 70 | {% if states('sensor.deyeinvertermaster_inverter_output_power')|float < 0.0 %} 71 | {{ (states('sensor.deyeinvertermaster_battery_output_power') | float(4) | abs ) * 0.001 }} 72 | {% else %} 73 | 0.0 74 | {% endif %} 75 | 76 | - name: "deyeinvertermaster_ha_time" 77 | state: | 78 | {{ now().strftime('%y%m%d%H%M') }} 79 | 80 | sensor: 81 | - platform: integration 82 | name: deyeinvertermaster_summary_total_battery_charge_grid 83 | source: sensor.deyeinvertermaster_battery_charge_grid_power 84 | method: left 85 | 86 | - platform: integration 87 | name: deyeinverterslave_summary_total_battery_charge_grid 88 | source: sensor.deyeinverterslave_battery_charge_grid_power 89 | method: left 90 | 91 | utility_meter: 92 | master_energy_battery_charge_grid: 93 | name: deyeinvertermaster_summary_day_battery_charge_grid 94 | source: sensor.deyeinvertermaster_summary_total_battery_charge_grid 95 | cycle: daily 96 | 97 | slave_energy_battery_charge_grid: 98 | name: deyeinverterslave_summary_day_battery_charge_grid 99 | source: sensor.deyeinverterslave_summary_total_battery_charge_grid 100 | cycle: daily 101 | -------------------------------------------------------------------------------- /packages/smartdeyedongle_automations.yaml: -------------------------------------------------------------------------------- 1 | automation: 2 | - id: "1680707528756" 3 | alias: InverterConfig Update Times 4 | description: Automation fetches TimeOfUse values and updates HA/Inverter 5 | triggers: 6 | - trigger: state 7 | entity_id: 8 | - number.deyeinvertermaster_timezone1_time 9 | - number.deyeinvertermaster_timezone2_time 10 | - number.deyeinvertermaster_timezone3_time 11 | - number.deyeinvertermaster_timezone4_time 12 | - number.deyeinvertermaster_timezone5_time 13 | - number.deyeinvertermaster_timezone6_time 14 | id: sendUpdatetoHATimeObjects 15 | - trigger: state 16 | entity_id: 17 | - input_datetime.timezone1_time 18 | - input_datetime.timezone2_time 19 | - input_datetime.timezone3_time 20 | - input_datetime.timezone4_time 21 | - input_datetime.timezone5_time 22 | - input_datetime.timezone6_time 23 | id: SendUpdateToInverter 24 | condition: 25 | - condition: template 26 | value_template: "{{ trigger.to_state.state != 'unavailable' }}" 27 | actions: 28 | - delay: 29 | hours: 0 30 | minutes: 0 31 | seconds: 2 32 | milliseconds: 0 33 | - choose: 34 | - conditions: 35 | - condition: trigger 36 | id: 37 | - SendUpdateToInverter 38 | sequence: 39 | - action: number.set_value 40 | target: 41 | entity_id: number.deyeinvertermaster_timezone1_time 42 | data: 43 | value: 44 | '{{state_attr(''input_datetime.timezone1_time'', ''timestamp'') | 45 | timestamp_custom("%H%M", false) | float}}' 46 | - action: number.set_value 47 | target: 48 | entity_id: number.deyeinvertermaster_timezone2_time 49 | data: 50 | value: 51 | '{{state_attr(''input_datetime.timezone2_time'', ''timestamp'') | 52 | timestamp_custom("%H%M", false) | float}}' 53 | - action: number.set_value 54 | target: 55 | entity_id: number.deyeinvertermaster_timezone3_time 56 | data: 57 | value: 58 | '{{state_attr(''input_datetime.timezone3_time'', ''timestamp'') | 59 | timestamp_custom("%H%M", false) | float}}' 60 | - action: number.set_value 61 | target: 62 | entity_id: number.deyeinvertermaster_timezone4_time 63 | data: 64 | value: 65 | '{{state_attr(''input_datetime.timezone4_time'', ''timestamp'') | 66 | timestamp_custom("%H%M", false) | float}}' 67 | - action: number.set_value 68 | target: 69 | entity_id: number.deyeinvertermaster_timezone5_time 70 | data: 71 | value: 72 | '{{state_attr(''input_datetime.timezone5_time'', ''timestamp'') | 73 | timestamp_custom("%H%M", false) | float}}' 74 | - action: number.set_value 75 | target: 76 | entity_id: number.deyeinvertermaster_timezone6_time 77 | data: 78 | value: 79 | '{{state_attr(''input_datetime.timezone6_time'', ''timestamp'') | 80 | timestamp_custom("%H%M", false) | float}}' 81 | - conditions: 82 | - condition: trigger 83 | id: 84 | - sendUpdatetoHATimeObjects 85 | sequence: 86 | - action: input_datetime.set_datetime 87 | target: 88 | entity_id: input_datetime.timezone1_time 89 | data: 90 | time: 91 | "{% set min = ((states('number.deyeinvertermaster_timezone1_time') | int) 92 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone1_time') 93 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 94 | - action: input_datetime.set_datetime 95 | target: 96 | entity_id: input_datetime.timezone2_time 97 | data: 98 | time: 99 | "{% set min = ((states('number.deyeinvertermaster_timezone2_time') | int) 100 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone2_time') 101 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 102 | - action: input_datetime.set_datetime 103 | target: 104 | entity_id: input_datetime.timezone3_time 105 | data: 106 | time: 107 | "{% set min = ((states('number.deyeinvertermaster_timezone3_time') | int) 108 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone3_time') 109 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 110 | - action: input_datetime.set_datetime 111 | target: 112 | entity_id: input_datetime.timezone4_time 113 | data: 114 | time: 115 | "{% set min = ((states('number.deyeinvertermaster_timezone4_time') | int) 116 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone4_time') 117 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 118 | - action: input_datetime.set_datetime 119 | target: 120 | entity_id: input_datetime.timezone5_time 121 | data: 122 | time: 123 | "{% set min = ((states('number.deyeinvertermaster_timezone5_time') | int) 124 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone5_time') 125 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 126 | - action: input_datetime.set_datetime 127 | target: 128 | entity_id: input_datetime.timezone6_time 129 | data: 130 | time: 131 | "{% set min = ((states('number.deyeinvertermaster_timezone6_time') | int) 132 | % 100) %} {% set hour = ((states('number.deyeinvertermaster_timezone6_time') 133 | | int) // 100) %} {{'%02d' % hour}}:{{'%02d' % min}}:00" 134 | - delay: 135 | hours: 0 136 | minutes: 0 137 | seconds: 2 138 | milliseconds: 0 139 | mode: single 140 | - id: "1717083464657" 141 | alias: Server Sync Clock 142 | description: "" 143 | triggers: 144 | - trigger: time 145 | at: 00:50:00 146 | id: enableSync 147 | - trigger: time 148 | at: 01:10:00 149 | id: disableSync 150 | condition: [] 151 | actions: 152 | - choose: 153 | - conditions: 154 | - condition: trigger 155 | id: 156 | - enableSync 157 | sequence: 158 | - action: select.select_option 159 | target: 160 | entity_id: select.deyeinvertermaster_inverter_basic_settings_sync_clock 161 | data: 162 | option: Enable 163 | - conditions: 164 | - condition: trigger 165 | id: 166 | - disableSync 167 | sequence: 168 | - action: select.select_option 169 | metadata: {} 170 | data: 171 | option: Disable 172 | target: 173 | entity_id: select.deyeinvertermaster_inverter_basic_settings_sync_clock 174 | mode: single 175 | 176 | -------------------------------------------------------------------------------- /packages/smartdeyedongle_master_slave.yaml: -------------------------------------------------------------------------------- 1 | #These entries below define data fields to store the TimeOfUse values on home_assistant side 2 | #The automation will take a change in value and populate the value on the inverter accordingly 3 | input_datetime: 4 | timezone1_time: 5 | name: Timezone 1 Time 6 | has_date: false 7 | has_time: true 8 | timezone2_time: 9 | name: Timezone 2 Time 10 | has_date: false 11 | has_time: true 12 | timezone3_time: 13 | name: Timezone 3 Time 14 | has_date: false 15 | has_time: true 16 | timezone4_time: 17 | name: Timezone 4 Time 18 | has_date: false 19 | has_time: true 20 | timezone5_time: 21 | name: Timezone 5 Time 22 | has_date: false 23 | has_time: true 24 | timezone6_time: 25 | name: Timezone 6 Time 26 | has_date: false 27 | has_time: true 28 | 29 | template: 30 | - sensor: 31 | - name: "deyeinvertermaster_solar_power_used" 32 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') | float(1) - states('sensor.deyeinvertermaster_solar_power_battery_charge') | float(1)) |round(1) }}" 33 | unit_of_measurement: "kWh" 34 | device_class: energy 35 | state_class: total_increasing 36 | 37 | - name: "deyeinvertermaster_solar_power_battery_charge" 38 | state: "{{ ( states('sensor.deyeinvertermaster_summary_day_battery_charge') | float(1) - states('sensor.deyeinvertermaster_summary_day_battery_charge_grid') | float(1)) | round(1) }}" 39 | unit_of_measurement: "kWh" 40 | device_class: energy 41 | state_class: total_increasing 42 | 43 | #essential = inverter_power_175 + grid_power_169 - aux_power_166 44 | - name: "deyeinvertermaster_essential_load" 45 | state: "{{ (states('sensor.deyeinvertermaster_inverter_output_power') |float(0) + (states('sensor.deyeinvertermaster_grid_load_l1') |float(0) - states('sensor.deyeinvertermaster_aux_output_power') |float(0) )) | round(0)}}" 46 | unit_of_measurement: "W" 47 | device_class: power 48 | state_class: measurement 49 | 50 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 51 | - name: "deyeinvertermaster_non_essential_load" 52 | state: "{{ (states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinvertermaster_grid_load_l1') |float(0))) | round(0)}}" 53 | unit_of_measurement: "W" 54 | device_class: power 55 | state_class: measurement 56 | 57 | - name: "deyeinvertermaster_priority_charge_or_load" 58 | state: | 59 | {% if is_state('select.deyeinvertermaster_energy_management_model', 'Battery Priority Mode') %} 60 | off 61 | {% else %} 62 | on 63 | {% endif %} 64 | 65 | - name: deyeinvertermaster_battery_charge_grid_power 66 | unit_of_measurement: "kW" 67 | state_class: measurement 68 | device_class: power 69 | state: >- 70 | {% if states('sensor.deyeinvertermaster_inverter_output_power')|float < 0.0 %} 71 | {{ (states('sensor.deyeinvertermaster_battery_output_power') | float(4) | abs ) * 0.001 }} 72 | {% else %} 73 | 0.0 74 | {% endif %} 75 | 76 | ####################Slave Inverter ################################## 77 | 78 | - name: "deyeinverterslave_solar_power_used" 79 | state: "{{ (states('sensor.deyeinverterslave_summary_day_pv') | float(0) - states('sensor.deyeinverterslave_summary_day_battery_charge') | float(0)) |round(1) }}" 80 | unit_of_measurement: "kWh" 81 | device_class: energy 82 | state_class: total_increasing 83 | 84 | #essential = deyeinverterslave_power_175 + grid_power_169 - aux_power_166 85 | - name: "deyeinverterslave_essential_load" 86 | state: "{{ (states('sensor.deyeinverterslave_deyeinverterslave_output_power') |float(0) + (states('sensor.deyeinverterslave_grid_load_l1') |float(0) - states('sensor.deyeinverterslave_aux_output_power') |float(0) )) | round(0)}}" 87 | unit_of_measurement: "W" 88 | device_class: power 89 | state_class: measurement 90 | 91 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 92 | - name: "deyeinverterslave_non_essential_load" 93 | state: "{{ (states('sensor.deyeinverterslave_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinverterslave_grid_load_l1') |float(0))) | round(0)}}" 94 | unit_of_measurement: "W" 95 | device_class: power 96 | state_class: measurement 97 | 98 | - name: "deyeinverterslave_priority_charge_or_load" 99 | state: | 100 | {% if is_state('select.deyeinverterslave_energy_management_model', 'Battery Priority Mode') %} 101 | off 102 | {% else %} 103 | on 104 | {% endif %} 105 | 106 | - name: deyeinverterslave_battery_charge_grid_power 107 | unit_of_measurement: "kW" 108 | state_class: measurement 109 | device_class: power 110 | state: >- 111 | {% if states('sensor.deyeinverterslave_inverter_output_power')|float < 0.0 %} 112 | {{ (states('sensor.deyeinverterslave_battery_output_power') | float(4) | abs ) * 0.001 }} 113 | {% else %} 114 | 0.0 115 | {% endif %} 116 | 117 | #################### Combined System view ( Master + Slave )################################## 118 | - name: "deyeinvertercombined_battery_soc" 119 | state: |- 120 | {% if (has_value('sensor.deyeinvertermaster_battery_soc') and has_value('sensor.deyeinverterslave_battery_soc')) %} 121 | {{ (states('sensor.deyeinvertermaster_battery_soc') |float(1) + (states('sensor.deyeinverterslave_battery_soc') |float(1))) / 2.0 }} 122 | {% else %} 123 | {{0.0}} 124 | {% endif %} 125 | availability: >- 126 | {{ (has_value('sensor.deyeinvertermaster_battery_soc') and has_value('sensor.deyeinverterslave_battery_soc')) }} 127 | unit_of_measurement: "%" 128 | device_class: battery 129 | 130 | - name: "deyeinvertercombined_battery_voltage" 131 | state: "{{ (states('sensor.deyeinvertermaster_battery_voltage') |float(1) + (states('sensor.deyeinverterslave_battery_voltage') |float(1))) / 2.0 }}" 132 | unit_of_measurement: "V" 133 | device_class: voltage 134 | 135 | - name: "deyeinvertercombined_summary_day_battery_charge" 136 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_battery_charge') |float(0) + (states('sensor.deyeinverterslave_summary_day_battery_charge') |float(0))) | round(1)}}" 137 | unit_of_measurement: "kWh" 138 | device_class: energy 139 | state_class: total_increasing 140 | 141 | - name: "deyeinvertercombined_summary_day_load" 142 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_load') |float(0) + (states('sensor.deyeinverterslave_summary_day_load') |float(0))) | round(1) }}" 143 | unit_of_measurement: "kWh" 144 | device_class: energy 145 | state_class: total_increasing 146 | availability: >- 147 | {{ (has_value('sensor.deyeinvertermaster_summary_day_load') and has_value('sensor.deyeinverterslave_summary_day_load')) }} 148 | 149 | - name: "deyeinvertercombined_summary_day_battery_discharge" 150 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_battery_discharge') |float(0) + (states('sensor.deyeinverterslave_summary_day_battery_discharge') |float(0))) | round(1)}}" 151 | unit_of_measurement: "kWh" 152 | device_class: energy 153 | state_class: total_increasing 154 | 155 | - name: "deyeinvertercombined_summary_day_pv" 156 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv') |float(0))) | round(1)}}" 157 | unit_of_measurement: "kWh" 158 | device_class: energy 159 | state_class: total_increasing 160 | availability: >- 161 | {{ (has_value('sensor.deyeinvertermaster_summary_day_pv') and has_value('sensor.deyeinverterslave_summary_day_pv')) }} 162 | 163 | - name: "deyeinvertercombined_summary_day_pv1" 164 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv1') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv1') |float(0))) | round(1)}}" 165 | unit_of_measurement: "kWh" 166 | device_class: energy 167 | state_class: total_increasing 168 | 169 | - name: "deyeinvertercombined_summary_day_pv2" 170 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv2') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv2') |float(0))) | round(1)}}" 171 | unit_of_measurement: "kWh" 172 | device_class: energy 173 | state_class: total_increasing 174 | 175 | - name: "deyeinvertercombined_summary_day_pv3" 176 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv3') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv3') |float(0))) | round(1)}}" 177 | unit_of_measurement: "kWh" 178 | device_class: energy 179 | state_class: total_increasing 180 | 181 | - name: "deyeinvertercombined_summary_day_pv4" 182 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv4') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv4') |float(0))) | round(1)}}" 183 | unit_of_measurement: "kWh" 184 | device_class: energy 185 | state_class: total_increasing 186 | 187 | - name: "deyeinvertercombined_summary_day_grid_import_buy" 188 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_import_buy') |float(0))}}" 189 | unit_of_measurement: "kWh" 190 | device_class: energy 191 | state_class: total_increasing 192 | 193 | - name: "deyeinvertercombined_summary_day_grid_import_buy_half" 194 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_import_buy') |float(0) / 2.0)}}" 195 | unit_of_measurement: "kWh" 196 | device_class: energy 197 | state_class: total_increasing 198 | 199 | - name: "deyeinvertercombined_summary_day_grid_export_sell" 200 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_export_sell') |float(0) / 2.0)}}" 201 | unit_of_measurement: "kWh" 202 | device_class: energy 203 | state_class: total_increasing 204 | 205 | - name: "deyeinvertercombined_summary_total_pv" 206 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_pv') |float(3) + (states('sensor.deyeinverterslave_summary_total_pv') |float(3))) | round(4)}}" 207 | unit_of_measurement: "MWh" 208 | device_class: energy 209 | state_class: total_increasing 210 | availability: >- 211 | {{ (has_value('sensor.deyeinvertermaster_summary_total_pv') and has_value('sensor.deyeinverterslave_summary_total_pv')) }} 212 | 213 | - name: "deyeinvertercombined_summary_total_load" 214 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_load') |float(3) + (states('sensor.deyeinverterslave_summary_total_load') |float(3))) | round(4)}}" 215 | unit_of_measurement: "MWh" 216 | device_class: energy 217 | state_class: total_increasing 218 | 219 | - name: "deyeinvertercombined_summary_total_grid_import_buy" 220 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_grid_import_buy') |float(3)) | round(4)}}" 221 | unit_of_measurement: "MWh" 222 | device_class: energy 223 | state_class: total_increasing 224 | 225 | - name: "deyeinvertercombined_summary_total_grid_export_sell" 226 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_grid_export_sell') |float(3)) | round(4)}}" 227 | unit_of_measurement: "MWh" 228 | device_class: energy 229 | state_class: total_increasing 230 | 231 | - name: "deyeinvertercombined_summary_total_battery_discharge" 232 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_battery_discharge') |float(3) + (states('sensor.deyeinverterslave_summary_total_battery_discharge') |float(3))) | round(4)}}" 233 | unit_of_measurement: "MWh" 234 | device_class: energy 235 | state_class: total_increasing 236 | 237 | - name: "deyeinvertercombined_summary_total_battery_charge" 238 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_battery_charge') |float(3) + (states('sensor.deyeinverterslave_summary_total_battery_charge') |float(3))) | round(4)}}" 239 | unit_of_measurement: "MWh" 240 | device_class: energy 241 | state_class: total_increasing 242 | 243 | - name: "deyeinvertercombined_essential_load" 244 | state: "{{ (states('sensor.deyeinvertermaster_essential_load') |float(0) + (states('sensor.deyeinverterslave_essential_load') |float(0))) | round(1)}}" 245 | unit_of_measurement: "W" 246 | device_class: power 247 | state_class: measurement 248 | 249 | - name: "deyeinvertercombined_grid_load" 250 | state: "{{ (states('sensor.deyeinvertermaster_grid_load') |float(0) + (states('sensor.deyeinverterslave_grid_load') |float(0))) | round(1)}}" 251 | unit_of_measurement: "W" 252 | device_class: power 253 | state_class: measurement 254 | 255 | - name: "deyeinvertercombined_inverter_output_power" 256 | state: "{{ (states('sensor.deyeinvertermaster_inverter_output_power') |float(0) + (states('sensor.deyeinverterslave_inverter_output_power') |float(0))) | round(1)}}" 257 | unit_of_measurement: "W" 258 | device_class: power 259 | state_class: measurement 260 | 261 | - name: "deyeinvertercombined_battery_output_power" 262 | state: "{{ (states('sensor.deyeinvertermaster_battery_output_power') |float(0) + (states('sensor.deyeinverterslave_battery_output_power') |float(0))) | round(1)}}" 263 | unit_of_measurement: "W" 264 | device_class: power 265 | state_class: measurement 266 | 267 | - name: "deyeinvertercombined_solar_power_used" 268 | state: "{{ (states('sensor.deyeinvertermaster_solar_power_used') |float(0) + (states('sensor.deyeinverterslave_solar_power_used') |float(0))) | round(1)}}" 269 | unit_of_measurement: "kWh" 270 | device_class: energy 271 | state_class: total_increasing 272 | 273 | - name: "deyeinvertercombined_pv_power" 274 | state: "{{ (states('sensor.deyeinvertermaster_pv_power') |float(0) + (states('sensor.deyeinverterslave_pv_power') |float(0))) | round(1)}}" 275 | unit_of_measurement: "W" 276 | device_class: power 277 | state_class: measurement 278 | availability: >- 279 | {{ (has_value('sensor.deyeinvertermaster_pv_power') and has_value('sensor.deyeinverterslave_pv_power')) }} 280 | 281 | - name: "deyeinvertercombined_pv1_power" 282 | state: "{{ (states('sensor.deyeinvertermaster_pv1_power') |float(0) + (states('sensor.deyeinverterslave_pv1_power') |float(0))) | round(1)}}" 283 | unit_of_measurement: "W" 284 | device_class: power 285 | state_class: measurement 286 | 287 | - name: "deyeinvertercombined_pv2_power" 288 | state: "{{ (states('sensor.deyeinvertermaster_pv2_power') |float(0) + (states('sensor.deyeinverterslave_pv2_power') |float(0))) | round(1)}}" 289 | unit_of_measurement: "W" 290 | device_class: power 291 | state_class: measurement 292 | 293 | - name: "deyeinvertercombined_pv3_power" 294 | state: "{{ (states('sensor.deyeinvertermaster_pv3_power') |float(0) + (states('sensor.deyeinverterslave_pv3_power') |float(0))) | round(1)}}" 295 | unit_of_measurement: "W" 296 | device_class: power 297 | state_class: measurement 298 | 299 | - name: "deyeinvertercombined_pv4_power" 300 | state: "{{ (states('sensor.deyeinvertermaster_pv4_power') |float(0) + (states('sensor.deyeinverterslave_pv4_power') |float(0))) | round(1)}}" 301 | unit_of_measurement: "W" 302 | device_class: power 303 | state_class: measurement 304 | 305 | - name: "deyeinvertercombined_grid_power_ct_clamp" 306 | state: "{{ states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) + states('sensor.deyeinverterslave_grid_power_ct_clamp') |float(1) }}" 307 | unit_of_measurement: "W" 308 | device_class: power 309 | state_class: measurement 310 | 311 | - name: "deyeinvertercombined_battery_output_current" 312 | state: "{{ (states('sensor.deyeinvertermaster_battery_output_current') |float(0) + (states('sensor.deyeinverterslave_battery_output_current') |float(0))) | round(1)}}" 313 | unit_of_measurement: "A" 314 | device_class: current 315 | state_class: measurement 316 | 317 | - name: "deyeinvertercombined_non_essential_load" 318 | state: "{{ (states('sensor.deyeinvertermaster_non_essential_load') |float(0) - (states('sensor.deyeinverterslave_non_essential_load') |float(0))) | round(1)}}" 319 | unit_of_measurement: "W" 320 | device_class: power 321 | state_class: measurement 322 | 323 | - name: deyeinvertercombined_battery_charge_grid_power 324 | unit_of_measurement: "kW" 325 | state_class: measurement 326 | device_class: power 327 | state: >- 328 | {% if states('sensor.deyeinvertercombined_inverter_output_power')|float < 0.0 %} 329 | {{ (states('sensor.deyeinvertercombined_battery_output_power') | float(4) | abs ) * 0.001 }} 330 | {% else %} 331 | 0.0 332 | {% endif %} 333 | 334 | #################### Allows Dongle to sync inverter time from HA ################################## 335 | - name: "deyeinvertermaster_ha_time" 336 | state: | 337 | {{ now().strftime('%y%m%d%H%M') }} 338 | 339 | sensor: 340 | - platform: integration 341 | name: deyeinvertermaster_summary_total_battery_charge_grid 342 | source: sensor.deyeinvertermaster_battery_charge_grid_power 343 | method: left 344 | 345 | - platform: integration 346 | name: deyeinverterslave_summary_total_battery_charge_grid 347 | source: sensor.deyeinverterslave_battery_charge_grid_power 348 | method: left 349 | 350 | utility_meter: 351 | master_energy_battery_charge_grid: 352 | name: deyeinvertermaster_summary_day_battery_charge_grid 353 | source: sensor.deyeinvertermaster_summary_total_battery_charge_grid 354 | cycle: daily 355 | 356 | slave_energy_battery_charge_grid: 357 | name: deyeinverterslave_summary_day_battery_charge_grid 358 | source: sensor.deyeinverterslave_summary_total_battery_charge_grid 359 | cycle: daily 360 | -------------------------------------------------------------------------------- /packages/smartdeyedongle_master_slave_slavec.yaml: -------------------------------------------------------------------------------- 1 | #These entries below define data fields to store the TimeOfUse values on home_assistant side 2 | #The automation will take a change in value and populate the value on the inverter accordingly 3 | input_datetime: 4 | timezone1_time: 5 | name: Timezone 1 Time 6 | has_date: false 7 | has_time: true 8 | timezone2_time: 9 | name: Timezone 2 Time 10 | has_date: false 11 | has_time: true 12 | timezone3_time: 13 | name: Timezone 3 Time 14 | has_date: false 15 | has_time: true 16 | timezone4_time: 17 | name: Timezone 4 Time 18 | has_date: false 19 | has_time: true 20 | timezone5_time: 21 | name: Timezone 5 Time 22 | has_date: false 23 | has_time: true 24 | timezone6_time: 25 | name: Timezone 6 Time 26 | has_date: false 27 | has_time: true 28 | 29 | template: 30 | - sensor: 31 | - name: "deyeinvertermaster_solar_power_used" 32 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') | float(1) - states('sensor.deyeinvertermaster_solar_power_battery_charge') | float(1)) |round(1) }}" 33 | unit_of_measurement: "kWh" 34 | device_class: energy 35 | state_class: total_increasing 36 | 37 | - name: "deyeinvertermaster_solar_power_battery_charge" 38 | state: "{{ ( states('sensor.deyeinvertermaster_summary_day_battery_charge') | float(1) - states('sensor.deyeinvertermaster_summary_day_battery_charge_grid') | float(1)) | round(1) }}" 39 | unit_of_measurement: "kWh" 40 | device_class: energy 41 | state_class: total_increasing 42 | 43 | #essential = inverter_power_175 + grid_power_169 - aux_power_166 44 | - name: "deyeinvertermaster_essential_load" 45 | state: "{{ (states('sensor.deyeinvertermaster_inverter_output_power') |float(0) + (states('sensor.deyeinvertermaster_grid_load_l1') |float(0) - states('sensor.deyeinvertermaster_aux_output_power') |float(0) )) | round(0)}}" 46 | unit_of_measurement: "W" 47 | device_class: power 48 | state_class: measurement 49 | 50 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 51 | - name: "deyeinvertermaster_non_essential_load" 52 | state: "{{ (states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinvertermaster_grid_load_l1') |float(0))) | round(0)}}" 53 | unit_of_measurement: "W" 54 | device_class: power 55 | state_class: measurement 56 | 57 | - name: "deyeinvertermaster_priority_charge_or_load" 58 | state: | 59 | {% if is_state('select.deyeinvertermaster_energy_management_model', 'Battery Priority Mode') %} 60 | off 61 | {% else %} 62 | on 63 | {% endif %} 64 | 65 | - name: deyeinvertermaster_battery_charge_grid_power 66 | unit_of_measurement: "kW" 67 | state_class: measurement 68 | device_class: power 69 | state: >- 70 | {% if states('sensor.deyeinvertermaster_inverter_output_power')|float < 0.0 %} 71 | {{ (states('sensor.deyeinvertermaster_battery_output_power') | float(4) | abs ) * 0.001 }} 72 | {% else %} 73 | 0.0 74 | {% endif %} 75 | 76 | ####################Slave Inverter ################################## 77 | 78 | - name: "deyeinverterslave_solar_power_used" 79 | state: "{{ (states('sensor.deyeinverterslave_summary_day_pv') | float(0) - states('sensor.deyeinverterslave_summary_day_battery_charge') | float(0)) |round(1) }}" 80 | unit_of_measurement: "kWh" 81 | device_class: energy 82 | state_class: total_increasing 83 | 84 | #essential = deyeinverterslave_power_175 + grid_power_169 - aux_power_166 85 | - name: "deyeinverterslave_essential_load" 86 | state: "{{ (states('sensor.deyeinverterslave_deyeinverterslave_output_power') |float(0) + (states('sensor.deyeinverterslave_grid_load_l1') |float(0) - states('sensor.deyeinverterslave_aux_output_power') |float(0) )) | round(0)}}" 87 | unit_of_measurement: "W" 88 | device_class: power 89 | state_class: measurement 90 | 91 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 92 | - name: "deyeinverterslave_non_essential_load" 93 | state: "{{ (states('sensor.deyeinverterslave_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinverterslave_grid_load_l1') |float(0))) | round(0)}}" 94 | unit_of_measurement: "W" 95 | device_class: power 96 | state_class: measurement 97 | 98 | - name: "deyeinverterslave_priority_charge_or_load" 99 | state: | 100 | {% if is_state('select.deyeinverterslave_energy_management_model', 'Battery Priority Mode') %} 101 | off 102 | {% else %} 103 | on 104 | {% endif %} 105 | 106 | - name: deyeinverterslave_battery_charge_grid_power 107 | unit_of_measurement: "kW" 108 | state_class: measurement 109 | device_class: power 110 | state: >- 111 | {% if states('sensor.deyeinverterslave_inverter_output_power')|float < 0.0 %} 112 | {{ (states('sensor.deyeinverterslave_battery_output_power') | float(4) | abs ) * 0.001 }} 113 | {% else %} 114 | 0.0 115 | {% endif %} 116 | 117 | # ####################Slave-C 118 | 119 | - name: "deyeinverterslavec_solar_power_used" 120 | state: "{{ (states('sensor.deyeinverterslavec_summary_day_pv') | float(0) - states('sensor.deyeinverterslavec_summary_day_battery_charge') | float(0)) |round(1) }}" 121 | unit_of_measurement: "kWh" 122 | device_class: energy 123 | state_class: total_increasing 124 | 125 | #essential = deyeinverterslave_power_175 + grid_power_169 - aux_power_166 126 | - name: "deyeinverterslavec_essential_load" 127 | state: "{{ (states('sensor.deyeinverterslavec_deyeinverterslavec_output_power') |float(0) + (states('sensor.deyeinverterslavec_grid_load') |float(0) - states('sensor.deyeinverterslavec_aux_output_power') |float(0) )) | round(0)}}" 128 | unit_of_measurement: "W" 129 | device_class: power 130 | state_class: measurement 131 | 132 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 133 | - name: "deyeinverterslavec_non_essential_load" 134 | state: "{{ (states('sensor.deyeinverterslavec_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinverterslavec_grid_load') |float(0))) | round(0)}}" 135 | unit_of_measurement: "W" 136 | device_class: power 137 | state_class: measurement 138 | 139 | - name: "deyeinverterslavec_priority_charge_or_load" 140 | state: | 141 | {% if is_state('select.deyeinverterslavec_energy_management_model', 'Battery Priority Mode') %} 142 | off 143 | {% else %} 144 | on 145 | {% endif %} 146 | 147 | - name: deyeinverterslavec_battery_charge_grid_power 148 | unit_of_measurement: "kW" 149 | state_class: measurement 150 | device_class: power 151 | state: >- 152 | {% if states('sensor.deyeinverterslavec_inverter_output_power')|float < 0.0 %} 153 | {{ (states('sensor.deyeinverterslavec_battery_output_power') | float(4) | abs ) * 0.001 }} 154 | {% else %} 155 | 0.0 156 | {% endif %} 157 | 158 | #################### Combined System view ( Master + Slave )################################## 159 | - name: "deyeinvertercombined_battery_soc" 160 | state: |- 161 | {% if (has_value('sensor.deyeinvertermaster_battery_soc') and has_value('sensor.deyeinverterslave_battery_soc')) %} 162 | {{ (states('sensor.deyeinvertermaster_battery_soc') |float(0) + (states('sensor.deyeinverterslave_battery_soc') |float(0))) / 2.0 }} 163 | {% else %} 164 | {{0.0}} 165 | {% endif %} 166 | availability: >- 167 | {{ (has_value('sensor.deyeinvertermaster_battery_soc') and has_value('sensor.deyeinverterslave_battery_soc')) }} 168 | unit_of_measurement: "%" 169 | device_class: battery 170 | 171 | - name: "deyeinvertercombined_battery_voltage" 172 | state: "{{ (states('sensor.deyeinvertermaster_battery_voltage') |float(0) + (states('sensor.deyeinverterslave_battery_voltage') |float(0)) + states('sensor.deyeinverterslavec_battery_voltage') |float(0)) / 3.0 }}" 173 | unit_of_measurement: "V" 174 | device_class: voltage 175 | 176 | - name: "deyeinvertercombined_summary_day_battery_charge" 177 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_battery_charge') |float(0) + (states('sensor.deyeinverterslave_summary_day_battery_charge') |float(0)) + (states('sensor.deyeinverterslavec_summary_day_battery_charge') |float(0))) | round(1)}}" 178 | unit_of_measurement: "kWh" 179 | device_class: energy 180 | state_class: total_increasing 181 | 182 | - name: "deyeinvertercombined_summary_day_load" 183 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_load') |float(0) + (states('sensor.deyeinverterslave_summary_day_load') |float(0)) + (states('sensor.deyeinverterslavec_summary_day_load') |float(0))) | round(1) }}" 184 | unit_of_measurement: "kWh" 185 | device_class: energy 186 | state_class: total_increasing 187 | availability: >- 188 | {{ (has_value('sensor.deyeinvertermaster_summary_day_load') and has_value('sensor.deyeinverterslave_summary_day_load') and has_value('sensor.deyeinverterslavec_summary_day_load')) }} 189 | 190 | - name: "deyeinvertercombined_summary_day_battery_discharge" 191 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_battery_discharge') |float(0) + (states('sensor.deyeinverterslave_summary_day_battery_discharge') |float(0)) + (states('sensor.deyeinverterslavec_summary_day_battery_discharge') |float(0))) | round(1)}}" 192 | unit_of_measurement: "kWh" 193 | device_class: energy 194 | state_class: total_increasing 195 | 196 | - name: "deyeinvertercombined_summary_day_pv" 197 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv') |float(1)) + (states('sensor.deyeinverterslavec_summary_day_pv') |float(0))) | round(1)}}" 198 | unit_of_measurement: "kWh" 199 | device_class: energy 200 | state_class: total_increasing 201 | availability: >- 202 | {{ (has_value('sensor.deyeinvertermaster_summary_day_pv') and has_value('sensor.deyeinverterslave_summary_day_pv') and has_value('sensor.deyeinverterslavec_summary_day_pv')) }} 203 | 204 | - name: "deyeinvertercombined_summary_day_pv1" 205 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv1') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv1') |float(1)) + (states('sensor.deyeinverterslavec_summary_day_pv1') |float(0))) | round(1)}}" 206 | unit_of_measurement: "kWh" 207 | device_class: energy 208 | state_class: total_increasing 209 | 210 | - name: "deyeinvertercombined_summary_day_pv2" 211 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv2') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv2') |float(0)) + (states('sensor.deyeinverterslavec_summary_day_pv2') |float(0))) | round(1)}}" 212 | unit_of_measurement: "kWh" 213 | device_class: energy 214 | state_class: total_increasing 215 | 216 | - name: "deyeinvertercombined_summary_day_pv3" 217 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv3') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv3') |float(0))+ (states('sensor.deyeinverterslavec_summary_day_pv3') |float(0))) | round(1)}}" 218 | unit_of_measurement: "kWh" 219 | device_class: energy 220 | state_class: total_increasing 221 | 222 | - name: "deyeinvertercombined_summary_day_pv4" 223 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv4') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv4') |float(0))+ (states('sensor.deyeinverterslavec_summary_day_pv4') |float(0))) | round(1)}}" 224 | unit_of_measurement: "kWh" 225 | device_class: energy 226 | state_class: total_increasing 227 | 228 | - name: "deyeinvertercombined_summary_day_grid_import_buy" 229 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_import_buy') |float(0) + (states('sensor.deyeinverterslave_summary_day_grid_import_buy') |float(0)) + (states('sensor.deyeinverterslavec_summary_day_grid_import_buy') |float(0))) | round(1)}}" 230 | unit_of_measurement: "kWh" 231 | device_class: energy 232 | state_class: total_increasing 233 | 234 | - name: "deyeinvertercombined_summary_day_grid_import_buy_half" 235 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_import_buy') |float(0) / 2.0)}}" 236 | unit_of_measurement: "kWh" 237 | device_class: energy 238 | state_class: total_increasing 239 | 240 | - name: "deyeinvertercombined_summary_day_grid_export_sell" 241 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_export_sell') |float(0)) + (states('sensor.deyeinverterslave_summary_day_grid_export_sell') |float(0)) + (states('sensor.deyeinverterslavec_summary_day_grid_export_sell') |float(0)) | round(1)}}" 242 | unit_of_measurement: "kWh" 243 | device_class: energy 244 | state_class: total_increasing 245 | 246 | - name: "deyeinvertercombined_summary_total_pv" 247 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_pv') |float(0) + (states('sensor.deyeinverterslave_summary_total_pv') |float(0)) + (states('sensor.deyeinverterslavec_summary_total_pv') |float(0)) ) | round(4)}}" 248 | unit_of_measurement: "MWh" 249 | device_class: energy 250 | state_class: total_increasing 251 | availability: >- 252 | {{ (has_value('sensor.deyeinvertermaster_summary_total_pv') and has_value('sensor.deyeinverterslave_summary_total_pv') and has_value('sensor.deyeinverterslavec_summary_total_pv')) }} 253 | 254 | - name: "deyeinvertercombined_summary_total_load" 255 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_load') |float(3) + (states('sensor.deyeinverterslave_summary_total_load') |float(3))) | round(4)}}" 256 | unit_of_measurement: "MWh" 257 | device_class: energy 258 | state_class: total_increasing 259 | 260 | - name: "deyeinvertercombined_summary_total_grid_import_buy" 261 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_grid_import_buy') |float(3)) | round(4)}}" 262 | unit_of_measurement: "MWh" 263 | device_class: energy 264 | state_class: total_increasing 265 | 266 | - name: "deyeinvertercombined_summary_total_grid_export_sell" 267 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_grid_export_sell') |float(3)) | round(4)}}" 268 | unit_of_measurement: "MWh" 269 | device_class: energy 270 | state_class: total_increasing 271 | 272 | - name: "deyeinvertercombined_summary_total_battery_discharge" 273 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_battery_discharge') |float(3) + (states('sensor.deyeinverterslave_summary_total_battery_discharge') |float(3))) | round(4)}}" 274 | unit_of_measurement: "MWh" 275 | device_class: energy 276 | state_class: total_increasing 277 | 278 | - name: "deyeinvertercombined_summary_total_battery_charge" 279 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_battery_charge') |float(3) + (states('sensor.deyeinverterslave_summary_total_battery_charge') |float(3))) | round(4)}}" 280 | unit_of_measurement: "MWh" 281 | device_class: energy 282 | state_class: total_increasing 283 | 284 | - name: "deyeinvertercombined_essential_load" 285 | state: "{{ (states('sensor.deyeinvertermaster_essential_load') |float(0) + (states('sensor.deyeinverterslave_essential_load') |float(0))) | round(1)}}" 286 | unit_of_measurement: "W" 287 | device_class: power 288 | state_class: measurement 289 | 290 | - name: "deyeinvertercombined_grid_load" 291 | state: "{{ (states('sensor.deyeinvertermaster_grid_load') |float(0) + (states('sensor.deyeinverterslave_grid_load') |float(0))) | round(1)}}" 292 | unit_of_measurement: "W" 293 | device_class: power 294 | state_class: measurement 295 | 296 | - name: "deyeinvertercombined_inverter_output_power" 297 | state: "{{ (states('sensor.deyeinvertermaster_inverter_output_power') |float(0) + (states('sensor.deyeinverterslave_inverter_output_power') |float(0))) | round(1)}}" 298 | unit_of_measurement: "W" 299 | device_class: power 300 | state_class: measurement 301 | 302 | - name: "deyeinvertercombined_battery_output_power" 303 | state: "{{ (states('sensor.deyeinvertermaster_battery_output_power') |float(0) + (states('sensor.deyeinverterslave_battery_output_power') |float(0))) | round(1)}}" 304 | unit_of_measurement: "W" 305 | device_class: power 306 | state_class: measurement 307 | 308 | - name: "deyeinvertercombined_solar_power_used" 309 | state: "{{ (states('sensor.deyeinvertermaster_solar_power_used') |float(0) + (states('sensor.deyeinverterslave_solar_power_used') |float(0))+ (states('sensor.deyeinverterslavec_solar_power_used') |float(0))) | round(1)}}" 310 | unit_of_measurement: "kWh" 311 | device_class: energy 312 | state_class: total_increasing 313 | 314 | - name: "deyeinvertercombined_pv_power" 315 | state: "{{ (states('sensor.deyeinvertermaster_pv_power') |float(0) + (states('sensor.deyeinverterslave_pv_power') |float(0)) + (states('sensor.deyeinverterslavec_pv_power') |float(0))) | round(1)}}" 316 | unit_of_measurement: "W" 317 | device_class: power 318 | state_class: measurement 319 | availability: >- 320 | {{ (has_value('sensor.deyeinvertermaster_pv_power') and has_value('sensor.deyeinverterslave_pv_power')) }} 321 | 322 | - name: "deyeinvertercombined_pv1_power" 323 | state: "{{ (states('sensor.deyeinvertermaster_pv1_power') |float(0) + (states('sensor.deyeinverterslave_pv1_power') |float(0))+ (states('sensor.deyeinverterslavec_pv1_power') |float(0))) | round(1)}}" 324 | unit_of_measurement: "W" 325 | device_class: power 326 | state_class: measurement 327 | 328 | - name: "deyeinvertercombined_pv2_power" 329 | state: "{{ (states('sensor.deyeinvertermaster_pv2_power') |float(0) + (states('sensor.deyeinverterslave_pv2_power') |float(0)) + (states('sensor.deyeinverterslavec_pv2_power') |float(0))) | round(1)}}" 330 | unit_of_measurement: "W" 331 | device_class: power 332 | state_class: measurement 333 | 334 | - name: "deyeinvertercombined_pv3_power" 335 | state: "{{ (states('sensor.deyeinvertermaster_pv3_power') |float(0) + (states('sensor.deyeinverterslave_pv3_power') |float(0)) + (states('sensor.deyeinverterslavec_pv3_power') |float(0))) | round(1)}}" 336 | unit_of_measurement: "W" 337 | device_class: power 338 | state_class: measurement 339 | 340 | - name: "deyeinvertercombined_pv4_power" 341 | state: "{{ (states('sensor.deyeinvertermaster_pv4_power') |float(0) + (states('sensor.deyeinverterslave_pv4_power') |float(0)) + (states('sensor.deyeinverterslavec_pv4_power') |float(0))) | round(1)}}" 342 | unit_of_measurement: "W" 343 | device_class: power 344 | state_class: measurement 345 | 346 | - name: "deyeinvertercombined_grid_power_ct_clamp" 347 | state: "{{ states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) + states('sensor.deyeinverterslave_grid_power_ct_clamp') |float(0) + states('sensor.deyeinverterslavec_grid_power_ct_clamp') |float(0) }}" 348 | unit_of_measurement: "W" 349 | device_class: power 350 | state_class: measurement 351 | 352 | - name: "deyeinvertercombined_battery_output_current" 353 | state: "{{ (states('sensor.deyeinvertermaster_battery_output_current') |float(0) + (states('sensor.deyeinverterslave_battery_output_current') |float(0)) + (states('sensor.deyeinverterslavec_battery_output_current') |float(0))) | round(1)}}" 354 | unit_of_measurement: "A" 355 | device_class: current 356 | state_class: measurement 357 | 358 | - name: "deyeinvertercombined_non_essential_load" 359 | state: "{{ (states('sensor.deyeinvertermaster_non_essential_load') |float(0) + (states('sensor.deyeinverterslave_non_essential_load') |float(0)) + (states('sensor.deyeinverterslavec_non_essential_load') |float(0))) | round(1)}}" 360 | unit_of_measurement: "W" 361 | device_class: power 362 | state_class: measurement 363 | 364 | - name: deyeinvertercombined_battery_charge_grid_power 365 | unit_of_measurement: "kW" 366 | state_class: measurement 367 | device_class: power 368 | state: >- 369 | {% if states('sensor.deyeinvertercombined_inverter_output_power')|float < 0.0 %} 370 | {{ (states('sensor.deyeinvertercombined_battery_output_power') | float(4) | abs ) * 0.001 }} 371 | {% else %} 372 | 0.0 373 | {% endif %} 374 | 375 | #################### Allows Dongle to sync inverter time from HA ################################## 376 | - name: "deyeinvertermaster_ha_time" 377 | state: | 378 | {{ now().strftime('%y%m%d%H%M') }} 379 | 380 | sensor: 381 | - platform: integration 382 | name: deyeinvertermaster_summary_total_battery_charge_grid 383 | source: sensor.deyeinvertermaster_battery_charge_grid_power 384 | method: left 385 | 386 | - platform: integration 387 | name: deyeinverterslave_summary_total_battery_charge_grid 388 | source: sensor.deyeinverterslave_battery_charge_grid_power 389 | method: left 390 | 391 | - platform: integration 392 | name: deyeinverterslavec_summary_total_battery_charge_grid 393 | source: sensor.deyeinverterslavec_battery_charge_grid_power 394 | method: left 395 | 396 | utility_meter: 397 | master_energy_battery_charge_grid: 398 | name: deyeinvertermaster_summary_day_battery_charge_grid 399 | source: sensor.deyeinvertermaster_summary_total_battery_charge_grid 400 | cycle: daily 401 | 402 | slave_energy_battery_charge_grid: 403 | name: deyeinverterslave_summary_day_battery_charge_grid 404 | source: sensor.deyeinverterslave_summary_total_battery_charge_grid 405 | cycle: daily 406 | 407 | slavec_energy_battery_charge_grid: 408 | name: deyeinverterslavec_summary_day_battery_charge_grid 409 | source: sensor.deyeinverterslavec_summary_total_battery_charge_grid 410 | cycle: daily 411 | -------------------------------------------------------------------------------- /packages/solarDesktop_solcastForecast.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - type: sidebar 3 | path: forecast 4 | title: Forecast 5 | cards: 6 | - type: custom:apexcharts-card 7 | header: 8 | title: Solar forecast 9 | show: true 10 | show_states: true 11 | colorize_states: true 12 | apex_config: 13 | chart: 14 | height: 400px 15 | tooltip: 16 | enabled: true 17 | shared: true 18 | followCursor: true 19 | graph_span: 24h 20 | span: 21 | start: day 22 | yaxis: 23 | - id: capacity 24 | show: true 25 | opposite: true 26 | decimals: 0 27 | max: 100 28 | min: 0 29 | apex_config: 30 | tickAmount: 10 31 | - id: kWh 32 | show: true 33 | min: 0 34 | apex_config: 35 | tickAmount: 10 36 | - id: header_only 37 | show: false 38 | series: 39 | - entity: sensor.deyeinvertermaster_pv_power 40 | name: Solar Power (now) 41 | type: line 42 | stroke_width: 2 43 | float_precision: 2 44 | color: Orange 45 | yaxis_id: kWh 46 | unit: kW 47 | extend_to: now 48 | show: 49 | legend_value: true 50 | in_header: false 51 | group_by: 52 | func: avg 53 | duration: 5m 54 | - entity: sensor.solcast_pv_forecast_forecast_today 55 | name: Forecast 56 | color: Grey 57 | opacity: 0.3 58 | stroke_width: 0 59 | type: area 60 | time_delta: +15min 61 | extend_to: false 62 | yaxis_id: kWh 63 | show: 64 | legend_value: false 65 | in_header: false 66 | data_generator: | 67 | return entity.attributes.detailedForecast.map((entry) => { 68 | return [new Date(entry.period_start), entry.pv_estimate * 1000]; 69 | }); 70 | - entity: sensor.solcast_pv_forecast_forecast_today 71 | name: Forecast 10% 72 | color: Grey 73 | opacity: 0.3 74 | stroke_width: 0 75 | type: area 76 | time_delta: +15min 77 | extend_to: false 78 | yaxis_id: kWh 79 | show: 80 | legend_value: false 81 | in_header: false 82 | data_generator: | 83 | return entity.attributes.detailedForecast.map((entry) => { 84 | return [new Date(entry.period_start), entry.pv_estimate10 * 1000]; 85 | }); 86 | - entity: sensor.deyeinvertermaster_summary_day_pv 87 | yaxis_id: header_only 88 | name: Today Actual 89 | stroke_width: 2 90 | color: Orange 91 | show: 92 | legend_value: true 93 | in_header: true 94 | in_chart: false 95 | - entity: sensor.solcast_pv_forecast_forecast_today 96 | yaxis_id: header_only 97 | name: Today Forecast 98 | color: Grey 99 | show: 100 | legend_value: true 101 | in_header: true 102 | in_chart: false 103 | - entity: sensor.solcast_pv_forecast_forecast_today 104 | attribute: estimate10 105 | yaxis_id: header_only 106 | name: Today Forecast 10% 107 | color: Grey 108 | opacity: 0.3 109 | show: 110 | legend_value: true 111 | in_header: true 112 | in_chart: false 113 | - entity: sensor.solcast_pv_forecast_forecast_remaining_today 114 | yaxis_id: header_only 115 | name: Remaining 116 | color: Grey 117 | show: 118 | legend_value: true 119 | in_header: true 120 | in_chart: false 121 | - type: custom:apexcharts-card 122 | apex_config: 123 | chart: 124 | height: 450px 125 | all_series_config: 126 | unit: ' kWh' 127 | update_interval: 10m 128 | header: 129 | title: Solar forecast 130 | show: true 131 | standard_format: true 132 | show_states: true 133 | colorize_states: true 134 | graph_span: 3d 135 | span: 136 | start: day 137 | offset: '-1d' 138 | now: 139 | show: true 140 | label: Now 141 | yaxis: 142 | - id: kwh 143 | min: 0 144 | max: ~4.8 145 | apex_config: 146 | tickAmount: 5 147 | - id: capacity 148 | show: true 149 | opposite: true 150 | decimals: 0 151 | max: 100 152 | min: 0 153 | apex_config: 154 | tickAmount: 5 155 | - id: header_only 156 | show: false 157 | series: 158 | - entity: sensor.deyeinvertermaster_pv_power 159 | yaxis_id: kwh 160 | type: area 161 | group_by: 162 | func: avg 163 | duration: 5min 164 | opacity: 0.4 165 | name: Actual Generation 166 | color: orange 167 | show: 168 | legend_value: false 169 | in_header: false 170 | in_chart: true 171 | stroke_width: 2 172 | float_precision: 2 173 | extend_to: false 174 | transform: return x / 1000; 175 | - entity: sensor.deyeinvertermaster_inverter_output_power 176 | name: House Power 177 | float_precision: 3 178 | type: line 179 | color: MediumAquaMarine 180 | opacity: 0.3 181 | stroke_width: 2 182 | yaxis_id: kwh 183 | unit: kW 184 | transform: return x/1000; 185 | extend_to: now 186 | show: 187 | legend_value: true 188 | in_header: false 189 | group_by: 190 | func: avg 191 | duration: 5m 192 | - entity: sensor.deyeinvertermaster_grid_power_ct_clamp 193 | name: Grid Power 194 | float_precision: 3 195 | type: line 196 | color: Blue 197 | opacity: 0.3 198 | stroke_width: 2 199 | yaxis_id: kwh 200 | unit: kW 201 | transform: return x/1000; 202 | extend_to: now 203 | show: 204 | legend_value: true 205 | in_header: false 206 | group_by: 207 | func: avg 208 | duration: 5m 209 | - entity: sensor.solcast_pv_forecast_forecast_today 210 | yaxis_id: kwh 211 | type: area 212 | opacity: 0.2 213 | name: Estimate Today 214 | color: yellow 215 | data_generator: > 216 | var today = entity.attributes.detailedForecast.map((start, index) 217 | => { 218 | return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate"]]; 219 | }); 220 | 221 | var data = today 222 | 223 | return data; 224 | show: 225 | legend_value: false 226 | in_header: false 227 | in_chart: true 228 | stroke_width: 3 229 | float_precision: 2 230 | extend_to: false 231 | - entity: sensor.solcast_pv_forecast_forecast_tomorrow 232 | yaxis_id: kwh 233 | type: area 234 | name: Tomorrow 235 | color: grey 236 | data_generator: > 237 | var today = entity.attributes.detailedForecast.map((start, index) 238 | => { 239 | return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate"]]; 240 | }); 241 | 242 | var data = today 243 | 244 | return data; 245 | show: 246 | legend_value: false 247 | in_header: false 248 | stroke_width: 3 249 | float_precision: 2 250 | extend_to: false 251 | - entity: sensor.deyeinvertermaster_battery_soc 252 | name: Battery 253 | float_precision: 0 254 | type: line 255 | color: red 256 | opacity: 0.6 257 | stroke_width: 2 258 | yaxis_id: capacity 259 | extend_to: now 260 | show: 261 | legend_value: true 262 | in_header: false 263 | unit: '%' 264 | - entity: sensor.deyeinvertermaster_summary_day_pv 265 | yaxis_id: header_only 266 | name: Generated Today 267 | color: orange 268 | show: 269 | legend_value: true 270 | in_header: true 271 | in_chart: false 272 | - entity: sensor.solcast_pv_forecast_forecast_today 273 | yaxis_id: header_only 274 | name: Forecast Today 275 | color: orange 276 | show: 277 | legend_value: true 278 | in_header: true 279 | in_chart: false 280 | - entity: sensor.solcast_pv_forecast_forecast_remaining_today 281 | yaxis_id: header_only 282 | name: Remaining 283 | color: orange 284 | show: 285 | legend_value: true 286 | in_header: true 287 | in_chart: false 288 | - entity: sensor.solcast_pv_forecast_forecast_tomorrow 289 | yaxis_id: header_only 290 | name: Tomorrow 291 | color: grey 292 | show: 293 | legend_value: true 294 | in_header: true 295 | in_chart: false 296 | - entity: sensor.solcast_pv_forecast_api_last_polled 297 | yaxis_id: header_only 298 | name: Last update 299 | unit: ' min.' 300 | transform: return ((Date.now()) - (new Date(x).getTime())) / 60 / 60 / 24 301 | show: 302 | legend_value: true 303 | in_header: true 304 | in_chart: false 305 | - title: Home 306 | cards: 307 | - type: entities 308 | entities: 309 | - entity: sensor.solcast_pv_forecast_forecast_day_3 310 | name: Forecast Day 3 311 | - entity: sensor.solcast_pv_forecast_forecast_day_4 312 | name: Forecast Day 4 313 | - entity: sensor.solcast_pv_forecast_forecast_day_5 314 | name: Forecast Day 5 315 | - entity: sensor.solcast_pv_forecast_forecast_day_6 316 | name: Forecast Day 6 317 | - entity: sensor.solcast_pv_forecast_forecast_day_7 318 | name: Forecast Day 7 319 | - entity: sensor.solcast_pv_forecast_forecast_next_hour 320 | name: Forecast Next Hour 321 | - entity: sensor.solcast_pv_forecast_forecast_next_x_hours 322 | name: Forecast Next X Hours 323 | - entity: sensor.solcast_pv_forecast_forecast_remaining_today 324 | name: Forecast Remaining Today 325 | - entity: sensor.solcast_pv_forecast_forecast_this_hour 326 | name: Forecast This Hour 327 | - entity: sensor.solcast_pv_forecast_forecast_today 328 | name: Forecast Today 329 | - entity: sensor.solcast_pv_forecast_forecast_tomorrow 330 | name: Forecast Tomorrow 331 | - entity: sensor.solcast_pv_forecast_peak_forecast_today 332 | name: Peak Forecast Today 333 | - entity: sensor.solcast_pv_forecast_peak_forecast_tomorrow 334 | name: Peak Forecast Tomorrow 335 | - entity: sensor.solcast_pv_forecast_peak_time_today 336 | name: Peak Time Today 337 | - entity: sensor.solcast_pv_forecast_peak_time_tomorrow 338 | name: Peak Time Tomorrow 339 | - entity: sensor.solcast_pv_forecast_power_in_1_hour 340 | name: Power in 1 Hour 341 | - entity: sensor.solcast_pv_forecast_power_in_30_minutes 342 | name: Power in 30 Minutes 343 | - entity: sensor.solcast_pv_forecast_power_now 344 | name: Power Now 345 | title: Solcast PV Forecast 346 | - type: entities 347 | entities: 348 | - entity: select.solcast_pv_forecast_use_forecast_field 349 | name: Use Forecast Field 350 | title: Solcast PV Forecast 351 | - type: entities 352 | entities: 353 | - entity: sensor.solcast_pv_forecast_api_last_polled 354 | name: API Last Polled 355 | - entity: sensor.solcast_pv_forecast_api_limit 356 | name: API Limit 357 | - entity: sensor.solcast_pv_forecast_api_used 358 | name: API Used 359 | - sensor.carrick 360 | - entity: sensor.solcast_pv_forecast_hard_limit_set 361 | name: Hard Limit Set 362 | title: Solcast PV Forecast 363 | -------------------------------------------------------------------------------- /packages/telegram.yaml: -------------------------------------------------------------------------------- 1 | # Example configuration.yaml entry for the Telegram Bot 2 | telegram_bot: 3 | - platform: polling 4 | api_key: 123456:ABCDEF_ETC_ETC #your bot API KEY HERE 5 | allowed_chat_ids: 6 | - 123 #your username chatid here as supplied by telegram 7 | - -12333321 #your chatgroup_for_bot chatid here, notice that groups start with minus 8 | 9 | # this is needed for the Telegram Bot 10 | notify: 11 | - platform: telegram 12 | name: use_user_id_here #Eg user: Heinz or solar: Solar 13 | chat_id: 123 #your username chatid here as supplied by telegram 14 | - platform: telegram 15 | name: chatgroup_for_bot 16 | chat_id: -12333321 #your chatgroup for your bot chatid here as supplied by telegram, notice that groups start with minus 17 | -------------------------------------------------------------------------------- /packages/telegram_automation.yaml: -------------------------------------------------------------------------------- 1 | - id: '1685459034446' 2 | alias: Telegram debug automation to see chatIDs 3 | description: '' 4 | trigger: 5 | - platform: event 6 | event_type: telegram_text 7 | event_data: 8 | text: command1 9 | id: sampleCommand1 10 | - platform: event 11 | event_type: telegram_text 12 | id: Unknown 13 | condition: [] 14 | action: 15 | - choose: 16 | - conditions: 17 | - condition: trigger 18 | id: Unknown 19 | sequence: 20 | - action: telegram_bot.send_message 21 | data: 22 | message: 'I got a message from chatID: {{ trigger.event.data.chat_id }}' 23 | target: '{{ trigger.event.data.chat_id }}' 24 | - conditions: 25 | - condition: trigger 26 | id: sampleCommand1 27 | sequence: 28 | - action: telegram_bot.send_message 29 | data: 30 | message: command1 was understood and I will action it now 31 | target: '{{ trigger.event.data.chat_id }}' 32 | - action: input_boolean.turn_on 33 | data: {} 34 | mode: parallel 35 | - id: '1685462793973' 36 | alias: Telegram Loadshedding annoucement 37 | description: '' 38 | trigger: 39 | - platform: numeric_state 40 | entity_id: sensor.deyeinvertermaster_grid_frequency 41 | for: 42 | hours: 0 43 | minutes: 0 44 | seconds: 5 45 | below: 49 46 | id: power-off 47 | - platform: numeric_state 48 | entity_id: sensor.deyeinvertermaster_grid_frequency 49 | for: 50 | hours: 0 51 | minutes: 0 52 | seconds: 5 53 | above: 49.1 54 | id: power-on 55 | - platform: numeric_state 56 | entity_id: sensor.deyeinvertermaster_battery_soc 57 | below: 20 58 | id: Battery below 20 59 | condition: [] 60 | action: 61 | - choose: 62 | - conditions: 63 | - condition: trigger 64 | id: power-on 65 | - condition: template 66 | value_template: '{{ trigger.from_state.state != ''unavailable'' }}' 67 | sequence: 68 | - action: telegram_bot.send_message 69 | data: 70 | message: 'Loadshedding finished with battery SOC: {{states("sensor.deyeinvertermaster_battery_soc")}}%' 71 | - action: telegram_bot.send_message 72 | data: 73 | message: 'Loadshedding finished with battery SOC: {{states("sensor.deyeinvertermaster_battery_soc")}}%' 74 | target: -12333321 75 | - conditions: 76 | - condition: trigger 77 | id: power-off 78 | - condition: template 79 | value_template: '{{ trigger.from_state.state != ''unavailable'' }}' 80 | sequence: 81 | - action: telegram_bot.send_message 82 | data: 83 | message: 'Loadshedding started with battery SOC: {{states("sensor.deyeinvertermaster_battery_soc")}}%' 84 | - action: telegram_bot.send_message 85 | data: 86 | message: 'Loadshedding started with battery SOC: {{states("sensor.deyeinvertermaster_battery_soc")}}%' 87 | target: -12333321 88 | - conditions: 89 | - condition: trigger 90 | id: Battery below 20 91 | - condition: numeric_state 92 | entity_id: sensor.deyeinvertermaster_grid_frequency 93 | below: 49 94 | sequence: 95 | - action: telegram_bot.send_message 96 | data: 97 | message: Grid down and battery below 20% 98 | - action: telegram_bot.send_message 99 | data: 100 | message: Grid down and battery below 20% 101 | target: -12333321 102 | mode: single 103 | 104 | -------------------------------------------------------------------------------- /solarDesktopPowerFlow.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - title: Home 3 | type: panel 4 | badges: [] 5 | cards: 6 | - type: custom:sunsynk-power-flow-card 7 | panel_mode: true 8 | card_width: 53% 9 | large_font: true 10 | cardstyle: full 11 | show_solar: true 12 | card_height: 410px 13 | show_grid: true 14 | solar: 15 | mppts: 4 16 | display_mode: 2 17 | colour: orange 18 | show_daily: true 19 | animation_speed: 6 20 | max_power: 50000 21 | auto_scale: true 22 | inverter: 23 | modern: true 24 | colour: grey 25 | three_phase: false 26 | autarky: energy 27 | auto_scale: true 28 | battery: 29 | energy: 121000 30 | shutdown_soc: 30 31 | invert_power: false 32 | colour: green 33 | show_daily: true 34 | animation_speed: 6 35 | max_power: 50000 36 | load: 37 | colour: '#5fb6ad' 38 | show_daily: true 39 | show_aux: true 40 | animation_speed: 4 41 | max_power: 80000 42 | aux_name: AUX-Loads 43 | aux_colour: 44 | - 0 45 | - 238 46 | - 255 47 | aux_type: mdi:air-conditioner 48 | show_daily_aux: true 49 | invert_aux: false 50 | show_absolute_aux: false 51 | aux_off_colour: 52 | - 208 53 | - 205 54 | - 205 55 | dynamic_icon: true 56 | dynamic_colour: true 57 | grid: 58 | colour: '#5490c2' 59 | show_daily_buy: true 60 | show_daily_sell: false 61 | no_grid_colour: red 62 | show_nonessential: false 63 | animation_speed: 9 64 | max_power: 60000 65 | grid_name: Generator 66 | nonessential_icon: mdi:generator-mobile 67 | nonessential_name: Generator 68 | entities: 69 | use_timer_248: switch.deyeinvertermaster_time_of_use 70 | priority_load_243: sensor.deyeinvertermaster_priority_charge_or_load 71 | day_battery_charge_70: sensor.deyeinvertermaster_summary_day_battery_charge 72 | day_battery_discharge_71: sensor.deyeinvertermaster_summary_day_battery_discharge 73 | day_load_energy_84: sensor.deyeinvertermaster_summary_day_load 74 | day_grid_import_76: sensor.deyeinvertermaster_summary_day_grid_import_buy 75 | day_grid_export_77: sensor.deyeinvertermaster_summary_day_grid_export_sell 76 | day_pv_energy_108: sensor.deyeinvertermaster_summary_day_pv 77 | inverter_voltage_154: sensor.deyeinvertermaster_grid_voltage_l1 78 | load_frequency_192: sensor.deyeinvertermaster_grid_frequency 79 | inverter_current_164: sensor.deyeinvertermaster_inverter_output_current_l1 80 | inverter_power_175: sensor.deyeinvertermaster_inverter_output_power 81 | grid_power_169: sensor.deyeinvertermaster_grid_load 82 | radiator_temp_91: sensor.deyeinvertermaster_temperature_ac_transformer 83 | dc_transformer_temp_90: sensor.deyeinvertermaster_temperature_dc_transformer 84 | pv1_power_186: sensor.deyeinvertermaster_pv1_power 85 | pv2_power_187: sensor.deyeinvertermaster_pv2_power 86 | pv3_power_188: sensor.deyeinvertermaster_pv3_power 87 | pv4_power_189: sensor.deyeinvertermaster_pv4_power 88 | battery_voltage_183: sensor.deyeinvertermaster_battery_voltage 89 | battery_soc_184: sensor.deyeinvertermaster_battery_soc 90 | battery_power_190: sensor.deyeinvertermaster_battery_output_power 91 | battery_current_191: sensor.deyeinvertermaster_battery_output_current 92 | battery_temp_182: sensor.deyeinvertermaster_battery_temperature 93 | grid_ct_power_172: sensor.deyeinvertermaster_grid_power_ct_clamp 94 | pv1_voltage_109: sensor.deyeinvertermaster_pv1_voltage 95 | pv1_current_110: sensor.deyeinvertermaster_pv1_current 96 | pv2_voltage_111: sensor.deyeinvertermaster_pv2_voltage 97 | pv2_current_112: sensor.deyeinvertermaster_pv2_current 98 | pv3_voltage_113: sensor.deyeinvertermaster_pv3_voltage 99 | pv3_current_114: sensor.deyeinvertermaster_pv3_current 100 | pv4_voltage_115: sensor.deyeinvertermaster_pv4_voltage 101 | pv4_current_116: sensor.deyeinvertermaster_pv4_current 102 | grid_connected_status_194: binary_sensor.deyeinvertermaster_grid_connected_status 103 | inverter_status_59: sensor.deyeinvertercmaster_inverter_system_state 104 | aux_power_166: sensor.deyeinvertermaster_generator_port_power 105 | day_aux_energy: sensor.deyeinvertermaster_summary_day_generator 106 | remaining_solar: sensor.energy_production_today_remaining 107 | solar_sell_247: switch.deyeinvertermaster_export_solar_enabled 108 | decimal_places: 2 109 | show_battery: true 110 | 111 | 112 | -------------------------------------------------------------------------------- /template.yaml: -------------------------------------------------------------------------------- 1 | sensor: 2 | - name: "deyeinvertermaster_solar_power_used" 3 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') | float(0) - states('sensor.deyeinvertermaster_summary_day_battery_charge') | float(0)) |round(1) }}" 4 | unit_of_measurement: "kWh" 5 | device_class: energy 6 | state_class: total_increasing 7 | 8 | #essential = inverter_power_175 + grid_power_169 - aux_power_166 9 | - name: "deyeinvertermaster_essential_load" 10 | state: "{{ (states('sensor.deyeinvertermaster_inverter_output_power') |float(0) + (states('sensor.deyeinvertermaster_grid_load') |float(0) - states('sensor.deyeinvertermaster_aux_output_power') |float(0) )) | round(0)}}" 11 | unit_of_measurement: "W" 12 | device_class: power 13 | state_class: measurement 14 | 15 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 16 | - name: "deyeinvertermaster_non_essential_load" 17 | state: "{{ (states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinvertermaster_grid_load_l1') |float(0))) | round(0)}}" 18 | unit_of_measurement: "W" 19 | device_class: power 20 | state_class: measurement 21 | 22 | - name: "deyeinvertermaster_priority_charge_or_load" 23 | state: | 24 | {% if is_state('select.deyeinvertermaster_energy_management_model', 'Battery Priority Mode') %} 25 | off 26 | {% else %} 27 | on 28 | {% endif %} 29 | -------------------------------------------------------------------------------- /template_3Phase.yaml: -------------------------------------------------------------------------------- 1 | sensor: 2 | - name: "deyeinvertermaster_solar_power_used" 3 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') | float(0) - states('sensor.deyeinvertermaster_summary_day_battery_charge') | float(0)) |round(1) }}" 4 | unit_of_measurement: "kWh" 5 | device_class: energy 6 | state_class: total_increasing 7 | 8 | #essential = deyeinvertermaster_power_175 + grid_power_169 - aux_power_166 9 | - name: "deyeinvertermaster_essential_load" 10 | state: "{{ (states('sensor.deyeinvertermaster_deyeinvertermaster_output_power') |float(0) + (states('sensor.deyeinvertermaster_grid_load') |float(0) - states('sensor.deyeinvertermaster_aux_output_power') |float(0) )) | round(0)}}" 11 | unit_of_measurement: "W" 12 | device_class: power 13 | state_class: measurement 14 | 15 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 16 | - name: "deyeinvertermaster_non_essential_load" 17 | state: "{{ (states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinvertermaster_grid_load') |float(0))) | round(0)}}" 18 | unit_of_measurement: "W" 19 | device_class: power 20 | state_class: measurement 21 | 22 | - name: "deyeinvertermaster_priority_charge_or_load" 23 | state: | 24 | {% if is_state('select.deyeinvertermaster_energy_management_model', 'Battery Priority Mode') %} 25 | off 26 | {% else %} 27 | on 28 | {% endif %} 29 | -------------------------------------------------------------------------------- /template_MasterSlave_System.yaml: -------------------------------------------------------------------------------- 1 | - trigger: 2 | - platform: time_pattern 3 | seconds: "/5" 4 | 5 | sensor: 6 | - name: "deyeinvertermaster_solar_power_used" 7 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') | float(0) - states('sensor.deyeinvertermaster_summary_day_battery_charge') | float(0)) |round(1) }}" 8 | unit_of_measurement: "kWh" 9 | device_class: energy 10 | state_class: total_increasing 11 | 12 | #essential = deyeinvertermaster_power_175 + grid_power_169 - aux_power_166 13 | - name: "deyeinvertermaster_essential_load" 14 | state: "{{ (states('sensor.deyeinvertermaster_deyeinvertermaster_output_power') |float(0) + (states('sensor.deyeinvertermaster_grid_load') |float(0) - states('sensor.deyeinvertermaster_aux_output_power') |float(0) )) | round(0)}}" 15 | unit_of_measurement: "W" 16 | device_class: power 17 | state_class: measurement 18 | 19 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 20 | - name: "deyeinvertermaster_non_essential_load" 21 | state: "{{ (states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinvertermaster_grid_load') |float(0))) | round(0)}}" 22 | unit_of_measurement: "W" 23 | device_class: power 24 | state_class: measurement 25 | 26 | - name: "deyeinvertermaster_priority_charge_or_load" 27 | state: | 28 | {% if is_state('select.deyeinvertermaster_energy_management_model', 'Battery Priority Mode') %} 29 | off 30 | {% else %} 31 | on 32 | {% endif %} 33 | 34 | - name: deyeinvertermaster_battery_charge_grid_power 35 | unit_of_measurement: "kW" 36 | state_class: measurement 37 | device_class: power 38 | state: >- 39 | {% if states('sensor.deyeinvertermaster_inverter_output_power')|float < 0.0 %} 40 | {{ (states('sensor.deyeinvertermaster_battery_output_power') | float(4) | abs ) * 0.001 }} 41 | {% else %} 42 | 0.0 43 | {% endif %} 44 | 45 | ####################Slave 46 | 47 | - name: "deyeinverterslave_solar_power_used" 48 | state: "{{ (states('sensor.deyeinverterslave_summary_day_pv') | float(0) - states('sensor.deyeinverterslave_summary_day_battery_charge') | float(0)) |round(1) }}" 49 | unit_of_measurement: "kWh" 50 | device_class: energy 51 | state_class: total_increasing 52 | 53 | #essential = deyeinverterslave_power_175 + grid_power_169 - aux_power_166 54 | - name: "deyeinverterslave_essential_load" 55 | state: "{{ (states('sensor.deyeinverterslave_deyeinverterslave_output_power') |float(0) + (states('sensor.deyeinverterslave_grid_load') |float(0) - states('sensor.deyeinverterslave_aux_output_power') |float(0) )) | round(0)}}" 56 | unit_of_measurement: "W" 57 | device_class: power 58 | state_class: measurement 59 | 60 | #nonessential = grid_ct_power_172 - grid_power_167 (L1) 61 | - name: "deyeinverterslave_non_essential_load" 62 | state: "{{ (states('sensor.deyeinverterslave_grid_power_ct_clamp') |float(0) - (states('sensor.deyeinverterslave_grid_load') |float(0))) | round(0)}}" 63 | unit_of_measurement: "W" 64 | device_class: power 65 | state_class: measurement 66 | 67 | - name: "deyeinverterslave_priority_charge_or_load" 68 | state: | 69 | {% if is_state('select.deyeinverterslave_energy_management_model', 'Battery Priority Mode') %} 70 | off 71 | {% else %} 72 | on 73 | {% endif %} 74 | 75 | - name: deyeinverterslave_battery_charge_grid_power 76 | unit_of_measurement: "kW" 77 | state_class: measurement 78 | device_class: power 79 | state: >- 80 | {% if states('sensor.deyeinverterslave_inverter_output_power')|float < 0.0 %} 81 | {{ (states('sensor.deyeinverterslave_battery_output_power') | float(4) | abs ) * 0.001 }} 82 | {% else %} 83 | 0.0 84 | {% endif %} 85 | 86 | #Combined entities for the summary view with Master/Slave inverters 87 | - name: "deyeinvertercombined_battery_soc" 88 | state: |- 89 | {% if (has_value('sensor.deyeinvertermaster_battery_soc') and has_value('sensor.deyeinverterslave_battery_soc')) %} 90 | {{ (states('sensor.deyeinvertermaster_battery_soc') |float(1) + (states('sensor.deyeinverterslave_battery_soc') |float(1))) / 2.0 }} 91 | {% else %} 92 | {{0.0}} 93 | {% endif %} 94 | availability: >- 95 | {{ (has_value('sensor.deyeinvertermaster_battery_soc') and has_value('sensor.deyeinverterslave_battery_soc')) }} 96 | unit_of_measurement: "%" 97 | device_class: battery 98 | 99 | - name: "deyeinvertercombined_battery_voltage" 100 | state: "{{ (states('sensor.deyeinvertermaster_battery_voltage') |float(1) + (states('sensor.deyeinverterslave_battery_voltage') |float(1))) / 2.0 }}" 101 | unit_of_measurement: "V" 102 | device_class: voltage 103 | 104 | - name: "deyeinvertercombined_summary_day_battery_charge" 105 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_battery_charge') |float(0) + (states('sensor.deyeinverterslave_summary_day_battery_charge') |float(0))) | round(1)}}" 106 | unit_of_measurement: "kWh" 107 | device_class: energy 108 | state_class: total_increasing 109 | 110 | - name: "deyeinvertercombined_summary_day_load" 111 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_load') |float(0) + (states('sensor.deyeinverterslave_summary_day_load') |float(0))) | round(1) }}" 112 | unit_of_measurement: "kWh" 113 | device_class: energy 114 | state_class: total_increasing 115 | availability: >- 116 | {{ (has_value('sensor.deyeinvertermaster_summary_day_load') and has_value('sensor.deyeinverterslave_summary_day_load')) }} 117 | 118 | - name: "deyeinvertercombined_summary_day_battery_discharge" 119 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_battery_discharge') |float(0) + (states('sensor.deyeinverterslave_summary_day_battery_discharge') |float(0))) | round(1)}}" 120 | unit_of_measurement: "kWh" 121 | device_class: energy 122 | state_class: total_increasing 123 | 124 | - name: "deyeinvertercombined_summary_day_pv" 125 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv') |float(0))) | round(1)}}" 126 | unit_of_measurement: "kWh" 127 | device_class: energy 128 | state_class: total_increasing 129 | availability: >- 130 | {{ (has_value('sensor.deyeinvertermaster_summary_day_pv') and has_value('sensor.deyeinverterslave_summary_day_pv')) }} 131 | 132 | - name: "deyeinvertercombined_summary_day_pv1" 133 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv1') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv1') |float(0))) | round(1)}}" 134 | unit_of_measurement: "kWh" 135 | device_class: energy 136 | state_class: total_increasing 137 | 138 | - name: "deyeinvertercombined_summary_day_pv2" 139 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv2') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv2') |float(0))) | round(1)}}" 140 | unit_of_measurement: "kWh" 141 | device_class: energy 142 | state_class: total_increasing 143 | 144 | - name: "deyeinvertercombined_summary_day_pv3" 145 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv3') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv3') |float(0))) | round(1)}}" 146 | unit_of_measurement: "kWh" 147 | device_class: energy 148 | state_class: total_increasing 149 | 150 | - name: "deyeinvertercombined_summary_day_pv4" 151 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_pv4') |float(0) + (states('sensor.deyeinverterslave_summary_day_pv4') |float(0))) | round(1)}}" 152 | unit_of_measurement: "kWh" 153 | device_class: energy 154 | state_class: total_increasing 155 | 156 | - name: "deyeinvertercombined_summary_day_grid_import_buy" 157 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_import_buy') |float(0))}}" 158 | unit_of_measurement: "kWh" 159 | device_class: energy 160 | state_class: total_increasing 161 | 162 | - name: "deyeinvertercombined_summary_day_grid_import_buy_half" 163 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_import_buy') |float(0) / 2.0)}}" 164 | unit_of_measurement: "kWh" 165 | device_class: energy 166 | state_class: total_increasing 167 | 168 | - name: "deyeinvertercombined_summary_day_grid_export_sell" 169 | state: "{{ (states('sensor.deyeinvertermaster_summary_day_grid_export_sell') |float(0) / 2.0)}}" 170 | unit_of_measurement: "kWh" 171 | device_class: energy 172 | state_class: total_increasing 173 | 174 | - name: "deyeinvertercombined_summary_total_pv" 175 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_pv') |float(3) + (states('sensor.deyeinverterslave_summary_total_pv') |float(3))) | round(4)}}" 176 | unit_of_measurement: "MWh" 177 | device_class: energy 178 | state_class: total_increasing 179 | availability: >- 180 | {{ (has_value('sensor.deyeinvertermaster_summary_total_pv') and has_value('sensor.deyeinverterslave_summary_total_pv')) }} 181 | 182 | - name: "deyeinvertercombined_summary_total_load" 183 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_load') |float(3) + (states('sensor.deyeinverterslave_summary_total_load') |float(3))) | round(4)}}" 184 | unit_of_measurement: "MWh" 185 | device_class: energy 186 | state_class: total_increasing 187 | 188 | - name: "deyeinvertercombined_summary_total_grid_import_buy" 189 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_grid_import_buy') |float(3)) | round(4)}}" 190 | unit_of_measurement: "MWh" 191 | device_class: energy 192 | state_class: total_increasing 193 | 194 | - name: "deyeinvertercombined_summary_total_grid_export_sell" 195 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_grid_export_sell') |float(3)) | round(4)}}" 196 | unit_of_measurement: "MWh" 197 | device_class: energy 198 | state_class: total_increasing 199 | 200 | - name: "deyeinvertercombined_summary_total_battery_discharge" 201 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_battery_discharge') |float(3) + (states('sensor.deyeinverterslave_summary_total_battery_discharge') |float(3))) | round(4)}}" 202 | unit_of_measurement: "MWh" 203 | device_class: energy 204 | state_class: total_increasing 205 | 206 | - name: "deyeinvertercombined_summary_total_battery_charge" 207 | state: "{{ (states('sensor.deyeinvertermaster_summary_total_battery_charge') |float(3) + (states('sensor.deyeinverterslave_summary_total_battery_charge') |float(3))) | round(4)}}" 208 | unit_of_measurement: "MWh" 209 | device_class: energy 210 | state_class: total_increasing 211 | 212 | - name: "deyeinvertercombined_essential_load" 213 | state: "{{ (states('sensor.deyeinvertermaster_essential_load') |float(0) + (states('sensor.deyeinverterslave_essential_load') |float(0))) | round(1)}}" 214 | unit_of_measurement: "W" 215 | device_class: power 216 | state_class: measurement 217 | 218 | - name: "deyeinvertercombined_grid_load" 219 | state: "{{ (states('sensor.deyeinvertermaster_grid_load') |float(0) + (states('sensor.deyeinverterslave_grid_load') |float(0))) | round(1)}}" 220 | unit_of_measurement: "W" 221 | device_class: power 222 | state_class: measurement 223 | 224 | - name: "deyeinvertercombined_inverter_output_power" 225 | state: "{{ (states('sensor.deyeinvertermaster_inverter_output_power') |float(0) + (states('sensor.deyeinverterslave_inverter_output_power') |float(0))) | round(1)}}" 226 | unit_of_measurement: "W" 227 | device_class: power 228 | state_class: measurement 229 | 230 | - name: "deyeinvertercombined_battery_output_power" 231 | state: "{{ (states('sensor.deyeinvertermaster_battery_output_power') |float(0) + (states('sensor.deyeinverterslave_battery_output_power') |float(0))) | round(1)}}" 232 | unit_of_measurement: "W" 233 | device_class: power 234 | state_class: measurement 235 | 236 | - name: "deyeinvertercombined_solar_power_used" 237 | state: "{{ (states('sensor.deyeinvertermaster_solar_power_used') |float(0) + (states('sensor.deyeinverterslave_solar_power_used') |float(0))) | round(1)}}" 238 | unit_of_measurement: "kWh" 239 | device_class: energy 240 | state_class: total_increasing 241 | 242 | - name: "deyeinvertercombined_pv_power" 243 | state: "{{ (states('sensor.deyeinvertermaster_pv_power') |float(0) + (states('sensor.deyeinverterslave_pv_power') |float(0))) | round(1)}}" 244 | unit_of_measurement: "W" 245 | device_class: power 246 | state_class: measurement 247 | availability: >- 248 | {{ (has_value('sensor.deyeinvertermaster_pv_power') and has_value('sensor.deyeinverterslave_pv_power')) }} 249 | 250 | - name: "deyeinvertercombined_pv1_power" 251 | state: "{{ (states('sensor.deyeinvertermaster_pv1_power') |float(0) + (states('sensor.deyeinverterslave_pv1_power') |float(0))) | round(1)}}" 252 | unit_of_measurement: "W" 253 | device_class: power 254 | state_class: measurement 255 | 256 | - name: "deyeinvertercombined_pv2_power" 257 | state: "{{ (states('sensor.deyeinvertermaster_pv2_power') |float(0) + (states('sensor.deyeinverterslave_pv2_power') |float(0))) | round(1)}}" 258 | unit_of_measurement: "W" 259 | device_class: power 260 | state_class: measurement 261 | 262 | - name: "deyeinvertercombined_pv3_power" 263 | state: "{{ (states('sensor.deyeinvertermaster_pv3_power') |float(0) + (states('sensor.deyeinverterslave_pv3_power') |float(0))) | round(1)}}" 264 | unit_of_measurement: "W" 265 | device_class: power 266 | state_class: measurement 267 | 268 | - name: "deyeinvertercombined_pv4_power" 269 | state: "{{ (states('sensor.deyeinvertermaster_pv4_power') |float(0) + (states('sensor.deyeinverterslave_pv4_power') |float(0))) | round(1)}}" 270 | unit_of_measurement: "W" 271 | device_class: power 272 | state_class: measurement 273 | 274 | - name: "deyeinvertercombined_grid_power_ct_clamp" 275 | state: "{{ states('sensor.deyeinvertermaster_grid_power_ct_clamp') |float(0) + states('sensor.deyeinverterslave_grid_power_ct_clamp') |float(1) }}" 276 | unit_of_measurement: "W" 277 | device_class: power 278 | state_class: measurement 279 | 280 | - name: "deyeinvertercombined_battery_output_current" 281 | state: "{{ (states('sensor.deyeinvertermaster_battery_output_current') |float(0) + (states('sensor.deyeinverterslave_battery_output_current') |float(0))) | round(1)}}" 282 | unit_of_measurement: "A" 283 | device_class: current 284 | state_class: measurement 285 | 286 | - name: "deyeinvertercombined_non_essential_load" 287 | state: "{{ (states('sensor.deyeinvertermaster_non_essential_load') |float(0) - (states('sensor.deyeinverterslave_non_essential_load') |float(0))) | round(1)}}" 288 | unit_of_measurement: "W" 289 | device_class: power 290 | state_class: measurement 291 | 292 | - name: deyeinvertercombined_battery_charge_grid_power 293 | unit_of_measurement: "kW" 294 | state_class: measurement 295 | device_class: power 296 | state: >- 297 | {% if states('sensor.deyeinvertercombined_inverter_output_power')|float < 0.0 %} 298 | {{ (states('sensor.deyeinvertercombined_battery_output_power') | float(4) | abs ) * 0.001 }} 299 | {% else %} 300 | 0.0 301 | {% endif %} 302 | --------------------------------------------------------------------------------