tesla icon indicating copy to clipboard operation
tesla copied to clipboard

Fresh install for Tesla inverter (no powerwall) has unavailable sensors

Open sargonas opened this issue 1 year ago • 0 comments

Using the latest version, 3.16.1 according to HACS

Issue

I have the integration installed and configured, to pull data from my Tesla solar Inverter (without powewall). It has auto created 3 entities for me,

  • sensor.house_solar_power (working as expected)
  • sensor.house_grid_power (returns as unavailable)
  • sensor.house_grid_power (returns as unavailable)

However, looking at the debug logs below, a lot of useful data IS being returned, but seemingly not being used.

I am trying to calculate the solar power generated, the solar power consumed, the grid power consumed, and the solar power returned to the grid. I need some of the data in the API responses below to make those calculations, and presumably that data should be assigned to the above sensors, but it is not.

Do I have something configured incorrectly?

Debug log

2023-09-12 12:24:30.558 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-09-12 12:24:30.558 DEBUG (MainThread) [teslajsonpy.controller] Updating SITE_DATA for energysite: [MY_SITE_ID_HERE]
2023-09-12 12:24:30.559 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 6:33:41
2023-09-12 12:24:30.559 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/energy_sites/[MY_SITE_ID_HERE]/live_status {}
2023-09-12 12:24:30.765 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"solar_power":6780,"load_power":828.0703125,"grid_status":"Unknown","grid_services_active":false,"grid_power":-5951.9296875,"grid_services_power":0,"generator_power":0,"island_status":"island_status_unknown","storm_mode_active":false,"timestamp":"2023-09-12T12:24:30-07:00","wall_connectors":[]}}
2023-09-12 12:24:30.766 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.208 seconds (success: True)
2023-09-12 12:24:40.558 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-09-12 12:24:40.558 DEBUG (MainThread) [teslajsonpy.controller] Updating SITE_DATA for energysite: [MY_SITE_ID_HERE]
2023-09-12 12:24:40.559 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 6:33:31
2023-09-12 12:24:40.559 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/energy_sites/[MY_SITE_ID_HERE]/live_status {}
2023-09-12 12:24:40.855 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"solar_power":6780,"load_power":828.0703125,"grid_status":"Unknown","grid_services_active":false,"grid_power":-5951.9296875,"grid_services_power":0,"generator_power":0,"island_status":"island_status_unknown","storm_mode_active":false,"timestamp":"2023-09-12T12:24:40-07:00","wall_connectors":[]}}
2023-09-12 12:24:40.857 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.299 seconds (success: True)
2023-09-12 12:24:50.558 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-09-12 12:24:50.558 DEBUG (MainThread) [teslajsonpy.controller] Updating SITE_DATA for energysite: [MY_SITE_ID_HERE]
2023-09-12 12:24:50.559 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 6:33:21
2023-09-12 12:24:50.559 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/energy_sites/[MY_SITE_ID_HERE]/live_status {}
2023-09-12 12:24:50.811 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"solar_power":6780,"load_power":828.0703125,"grid_status":"Unknown","grid_services_active":false,"grid_power":-5951.9296875,"grid_services_power":0,"generator_power":0,"island_status":"island_status_unknown","storm_mode_active":false,"timestamp":"2023-09-12T12:24:50-07:00","wall_connectors":[]}}
2023-09-12 12:24:50.811 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.253 seconds (success: True)
2023-09-12 12:25:00.558 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2023-09-12 12:25:00.558 DEBUG (MainThread) [teslajsonpy.controller] Updating SITE_DATA for energysite: [MY_SITE_ID_HERE]
2023-09-12 12:25:00.559 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 6:33:11
2023-09-12 12:25:00.559 DEBUG (MainThread) [teslajsonpy.connection] get: https://owner-api.teslamotors.com/api/1/energy_sites/[MY_SITE_ID_HERE]/live_status {}
2023-09-12 12:25:00.920 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"solar_power":6780,"load_power":828.0703125,"grid_status":"Unknown","grid_services_active":false,"grid_power":-5951.9296875,"grid_services_power":0,"generator_power":0,"island_status":"island_status_unknown","storm_mode_active":false,"timestamp":"2023-09-12T12:25:00-07:00","wall_connectors":[]}}
2023-09-12 12:25:00.920 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.363 seconds (success: True)

sargonas avatar Sep 12 '23 19:09 sargonas