I’ve decided to share my configuration in the hope that it might help someone.
I’ve received loads of help from the forums whilst building everything so far so thought I would share.
The config file is split into a large number of packages to allow it to be browsed and reused more easily. I’m working on documenting each section so you can see what it is doing.
Main features are:
Floorplan with lights / radiators / temperatures / presence
entity types can be switched on and off
Thanx and great sharing! You really must have put countless hours in to your set up. I’m interested in the Octopus Energy and Power Wall controls, I have a very basic understanding and managed to set up a simple HA dashboard to show my Solar generation, house load, energy difference (when excess solar present) and then from the back of that some automation’s to turn on and off some “luxury” electrical loads like UFH in the bathrooms. I just laid some new 16mm2 power cables from my house to the garage and I’m getting ready to have a PW2 installed, then I would like to have some control over the PW and its charging behaviour. I have read countless information on the PW and how tightly it is locked down. So does your system require any “hacking” of the PW that might affect its long term warranty? Do you have any documentation on how to set up from scratch the Octopus/PW automation’s that you have kindly shared on your Github? Or would I just need to copy all the tesla_powerwall .yaml files in to my packages/systems/tesla_powerwall folder? unlikely to be that easy, I know
Thanx once again for your share and also for any help setting up for the beginner.
Thanks for looking at my code.
You are right, I have spent (and do spend) a lot of time tweaking and improving the code.
No hacking of the powerwall is required.
Copy this folder into your custom components. Tesla Gateway
If you don’t use 2FA for your Tesla account then there is a slightly easier version to use, which I’ll find for you.
I use 2FA / MFA so at the moment I have to obtain a login token manually and put it into my secrets file.
This custom component allows the mode of the powerwall to be changed and the reserve %.
So I copied across those two folders and then went through each file in turn to make personal changes to details and sensors etc. A few questions, I note references to telegram chat and ‘solcast’. Please could you confirm that I need to make use of telegram app from telegram.org and then create myself an alias then use that as my “telegram_chat_id” in my !secrets file? What about the “solcast” data where do you pull that from? I could not find any plug-ins for HA in the app store or HACS for “Solcast” so I’m a bit unsure where to link that to for the charging forecasting component of the Tesla PW.
In the Octopus section you refer to “octopus_auth” is this my Octopus API key starting with “sk_live”? I did not see any references to the Octopus account number, is that required anywhere? I also changed the region from your L to my K.
Now that I made all the changes I went to the Configuration/server controls to verify my new yaml configurations before attempting any HA restart… I have worked my way though a few configuration invalid warnings up to this one, which Im unsure how to clear. would you have any advise about the mentioned “octopus_agile” setup and integrations?
Package octopus_agile setup failed. Component octopusagile Integration ‘octopusagile’ not found.
Platform error sensor.octopusagile - Integration ‘octopusagile’ not found.
Thanx once again for any pointers and assistance.
Chris
I think that I have made some progress today but I’m currently unable to parse the validation check on my .yaml files as it is getting stuck at the Telegram settings, please could you help me with the syntax required for the below error:
Invalid config for [telegram_bot]: expected int @ data[‘telegram_bot’][0][‘allowed_chat_ids’][0]. Got ‘t’. (See ?, line ?).
Invalid config for [notify.telegram]: expected int for dictionary value @ data[‘chat_id’]. Got ‘t.me/cwinstock789’. (See ?, line ?).
These are my !secret file entries (Changed the numbers and token numbers for protection):
telegram_chat_id_chris: t.me/cwinstock789
telegram_bot_chat_ids: t.me/cwinstock789_bot
telegram_api_key: 1701552601:BCHvzs8W21g-__DGYyjZ8OJFnqIC6jC7OvU
finally got things working…not bad for 14 hours of work eh!! But what an eye opener matey, I just copied your Tesla Powerwall, Telegram, Solcast and Octopus_agile folders and made some personal changes. I dont have the PW installed yet but hope to in the coming 2 months when I’m at the top of the waiting list. With the Telegram_bot running it gives a whole new dimension to Home Assistant and more importantly to the other half for easier interactions and feedback.
I have pushed my luck with the family today but it was great to spend the time on HA and learning from yourself, thank you!
I have not been able to retrieve Solcast data since setting up things. ‘/status’ always shows “Todays Solar Forecast: unknown kWh”. In HA if I look at the entities I see one defined as “sensor.solcast_forecast_2” which gives an output but “sensor.solcast_forecast_tomorrow” just returns UNAVAILABLE.
Please may I ask if you have the Solcast working presently for tomorrows forecasting, or like me you only have todays forecast?
I also note that you have defined them like this, pleae could you explain to me about that:
It looks like you’ve set it up twice.
Temporarily remove the integration and restart home assistant.
Go into entities, and delete any solcast entities that are left behind.
Then put the integration back in place.
You should have then sensor.solcast_forecast
This sensor has attributes for tomorrow forecast and day after tomorrow.
my template is splitting that attribute out into a seperate sensor.
Hi Bruce,
I cleaned out the spurious ‘Solcast_2’ sensors and now back to the original format and on my lovelace UI I can get the Solcast Forecast number (I assume that’s for today). However nothing displayed for ‘sensor.solcast_forecast_tomorrow’ or sensor.solcast_forecast_the_day_after_tomorrow.
Also if I call /solar or /status then the bot always reports “Todays forecast: unknown kWh”. THen when I replace your code “input_number.solcast_latest_today_forecast” with “sensor.solcast_forecast” then it will return “Todays solar forecast: 10.71 kWh”
Given your comment above, might it be possible that I have not copied over the .yaml or script that you used for your template to split that attribute in to separate sensors?
Have you created the helpers that are referenced? You’ll need to create the input_number helpers that the code looks at.
The today forecast from solcast is the forecast for the remainder of today.
I add this to the today production, so it always shows the forecast for the whole of today.
There will be template sensors in my folder for tomorrow forecast.
I think this is what you referred to where by you take the Solcast daily forecast which reduces throughout the day, then you add your current solar production value to that. Does it then give you a total valuse of Solcast forecast + actual solar home production? and to get that value would I bee calling on the id: “solcast_update_today_forecast” ?
Also below the ‘entity_id’ it has “- sensor.solcast_forecast” would I have to also add my daily solar production entity_id “- sensor.hauxtonenvoy_today_s_energy_production” which is part of the helper calculation?
I’m getting closer and now have the below displayed in Lovelace but still only getting the current Solcast forecast figure where I think it should be the result of the above “helper”.yaml that I posted above…
Below is the screen shot of my Solcast folder on the right side and your original folder structure on the left. so that you may see the files that I have in my HA: