DiedB / Homey-TeslaEnergy

GNU General Public License v3.0
1 stars 3 forks source link

[Feature Request] Detect power outage #22

Open wsu-runner opened 6 months ago

wsu-runner commented 6 months ago

Cards are already available to detect increase/decrease in charge level, charge rate, consumption, etc. I can use these to derive whether my home is running on Powerwall or grid power, but I can't seem to find a way to detect a grid outage.

Use case: if a grid outage is detected I'd like to shut off high-consumption devices (aircon, etc) and prolong the runtime of the battery.

Thanks for the consideration.

jonlanceley commented 6 months ago

I was after the same thing so i updated the code to do it. Never actually had a powercut to test it with since i wrote it but works when you take the powerwall off the grid in the tesla app.

Branch is here if your interested, you can just disable your current app and install this development one.

I did try to get it merged but the owner never got back to me. Im now moving to homeassistant so have no interest in chasing.

https://github.com/DiedB/Homey-TeslaEnergy/pull/21

wsu-runner commented 6 months ago

Thanks @jonlanceley . Nice work!

Hi @DiedB - looks pretty straightforward, would you mind reviewing and merging so it is in the main release? Thank you!