Need testers for updated Enphase Envoy sensor

I noticed in the log output the line numbers appear to be from an older version of sensor.py. Update the sensor.py and manifest.json and put them into the custom_components/enphase_envoy directory, replacing the older versions.

EDIT: Yeah sometimes things do get buried in the posts. You beat me to the punch by posting your logs. The links to the latest sensor.py and manifest.json from GitHub are above.

The Envoy firmware version shouldn’t be an issue. The envoy_reader API library should support versions from 3.x to 5.x

ok, I have updated both files and restarted HA. I now have less errors in the log, but most of the inverter sensors do not work at all now.

2020-11-25 23:11:10 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform enphase_envoy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
sstate = self.state
File "/config/custom_components/enphase_envoy/sensor.py", line 188, in state
value = self.coordinator.data.get("inverters_production").get(
TypeError: 'NoneType' object is not subscriptable
2020-11-25 23:11:10 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up enphase_envoy platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 207, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
sstate = self.state
File "/config/custom_components/enphase_envoy/sensor.py", line 188, in state
value = self.coordinator.data.get("inverters_production").get(
TypeError: 'NoneType' object is not subscriptable
2020-11-25 23:12:10 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 119, in _handle_refresh_interval
await self.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 193, in async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 245, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
sstate = self.state
File "/config/custom_components/enphase_envoy/sensor.py", line 188, in state
value = self.coordinator.data.get("inverters_production").get(
TypeError: 'NoneType' object is not subscriptable

Did you enable debug in the configuration.yaml?

You should see some output similar to this:

2020-11-25 14:17:13 DEBUG (MainThread) [homeassistant.components.enphase_envoy.sensor] Retrieved data from API: {‘production’: 1489, ‘consumption’: ‘Consumption data not available for your Envoy device.’, ‘daily_production’: 8772, ‘daily_consumption’: ‘Consumption data not available for your Envoy device.’, ‘seven_days_production’: 73882, ‘seven_days_consumption’: ‘Consumption data not available for your Envoy device.’, ‘lifetime_production’: 18433424, ‘lifetime_consumption’: ‘Consumption data not available for your Envoy device.’, ‘inverters_production’: {'…

The json output of: http://192.168.1.65/api/v1/production/inverters

Look fine though:

[
  {
    "serialNumber": "122022009125",
    "lastReportDate": 1606319448,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 198
  },
  {
    "serialNumber": "122022007165",
    "lastReportDate": 1606318901,
    "devType": 1,
    "lastReportWatts": -1,
    "maxReportWatts": 233
  },
  {
    "serialNumber": "122022010765",
    "lastReportDate": 1606319383,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 200
  },
  {
    "serialNumber": "122022007141",
    "lastReportDate": 1606319390,
    "devType": 1,
    "lastReportWatts": -1,
    "maxReportWatts": 235
  },
  {
    "serialNumber": "122022003320",
    "lastReportDate": 1606318905,
    "devType": 1,
    "lastReportWatts": -1,
    "maxReportWatts": 176
  },
  {
    "serialNumber": "122022009897",
    "lastReportDate": 1606318914,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 130
  },
  {
    "serialNumber": "122022008144",
    "lastReportDate": 1606319436,
    "devType": 1,
    "lastReportWatts": -1,
    "maxReportWatts": 197
  },
  {
    "serialNumber": "122022009149",
    "lastReportDate": 1606319469,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 204
  },
  {
    "serialNumber": "122022009197",
    "lastReportDate": 1606319437,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 197
  },
  {
    "serialNumber": "122022009871",
    "lastReportDate": 1606318916,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 124
  },
  {
    "serialNumber": "122022009122",
    "lastReportDate": 1606319402,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 201
  },
  {
    "serialNumber": "122022009124",
    "lastReportDate": 1606319445,
    "devType": 1,
    "lastReportWatts": -1,
    "maxReportWatts": 199
  },
  {
    "serialNumber": "122022009643",
    "lastReportDate": 1606318599,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 121
  },
  {
    "serialNumber": "122022009395",
    "lastReportDate": 1606318905,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 122
  },
  {
    "serialNumber": "122022009244",
    "lastReportDate": 1606319449,
    "devType": 1,
    "lastReportWatts": -1,
    "maxReportWatts": 197
  },
  {
    "serialNumber": "122022009799",
    "lastReportDate": 1606319458,
    "devType": 1,
    "lastReportWatts": -1,
    "maxReportWatts": 175
  },
  {
    "serialNumber": "122022009268",
    "lastReportDate": 1606318909,
    "devType": 1,
    "lastReportWatts": 0,
    "maxReportWatts": 232
  }
]

The output looks alright. The debug output would be the best to look into the issue more. If the output is a lot you can DM me the entire output.

Yes, I have this in my configuration.yaml, restarted and have no “DEBUG” in my log.

Are there multiple logger: sections? I know in my development setup if something like the below where logger is specified multiple times, is in my config I don’t get any debug output.

logger:
  default: info
  logs:
    homeassistant.components.cloud: debug
    homeassistant.components.enphase_envoy: debug

logger:
  default: info
  logs:
    homeassistant.components.cloud: debug

I had to set the default log level to debug.

2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Retrieved data from API: {'production': 14, 'consumption': 499, 'daily_production': 6466, 'daily_consumption': 16821, 'seven_days_production': 45045, 'seven_days_consumption': 99297, 'lifetime_production': 57933, 'lifetime_consumption': 119838, 'inverters_production': {'122022009125': [0, '2020-11-25 16:50:48'], '122022007165': [-1, '2020-11-25 16:41:41'], '122022010765': [0, '2020-11-25 16:49:43'], '122022007141': [-1, '2020-11-25 16:49:50'], '122022003320': [-1, '2020-11-25 16:41:45'], '122022009897': [0, '2020-11-25 16:41:54'], '122022008144': [-1, '2020-11-25 16:50:36'], '122022009149': [0, '2020-11-25 16:51:09'], '122022009197': [0, '2020-11-25 16:50:37'], '122022009871': [0, '2020-11-25 16:41:56'], '122022009122': [0, '2020-11-25 16:50:02'], '122022009124': [-1, '2020-11-25 16:50:45'], '122022009643': [0, '2020-11-25 16:36:39'], '122022009395': [0, '2020-11-25 16:41:45'], '122022009244': [-1, '2020-11-25 16:50:49'], '122022009799': [-1, '2020-11-25 16:50:58'], '122022009268': [0, '2020-11-25 16:41:49']}}
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Returning API data.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Finished fetching sensor data in 5.325 seconds
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Current Energy Production) - Type: production.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Today's Energy Production) - Type: daily_production.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Last Seven Days Energy Production) - Type: seven_days_production.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Lifetime Energy Production) - Type: lifetime_production.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Current Energy Consumption) - Type: consumption.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Today's Energy Consumption) - Type: daily_consumption.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Last Seven Days Energy Consumption) - Type: seven_days_consumption.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Lifetime Energy Consumption) - Type: lifetime_consumption.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Inverter data: {'122022009125': [0, '2020-11-25 16:50:48'], '122022007165': [-1, '2020-11-25 16:41:41'], '122022010765': [0, '2020-11-25 16:49:43'], '122022007141': [-1, '2020-11-25 16:49:50'], '122022003320': [-1, '2020-11-25 16:41:45'], '122022009897': [0, '2020-11-25 16:41:54'], '122022008144': [-1, '2020-11-25 16:50:36'], '122022009149': [0, '2020-11-25 16:51:09'], '122022009197': [0, '2020-11-25 16:50:37'], '122022009871': [0, '2020-11-25 16:41:56'], '122022009122': [0, '2020-11-25 16:50:02'], '122022009124': [-1, '2020-11-25 16:50:45'], '122022009643': [0, '2020-11-25 16:36:39'], '122022009395': [0, '2020-11-25 16:41:45'], '122022009244': [-1, '2020-11-25 16:50:49'], '122022009799': [-1, '2020-11-25 16:50:58'], '122022009268': [0, '2020-11-25 16:41:49']}
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009125 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022007165 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022010765 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022007141 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022003320 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009897 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022008144 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009149 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009197 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009871 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009122 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009124 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009643 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009395 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009244 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009799 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009268 - Type: inverters.
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: production - 14
2020-11-25 23:34:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_current_energy_production, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_current_energy_production=14; unit_of_measurement=W, friendly_name=Envoy-S meteredEnvoy Current Energy Production, icon=mdi:flash @ 2020-11-25T23:34:27.427160+01:00>>
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: daily_production - 6466
2020-11-25 23:34:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_today_s_energy_production, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_today_s_energy_production=6466; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Today's Energy Production, icon=mdi:flash @ 2020-11-25T23:34:27.427997+01:00>>
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: seven_days_production - 45045
2020-11-25 23:34:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_last_seven_days_energy_production, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_last_seven_days_energy_production=45045; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Last Seven Days Energy Production, icon=mdi:flash @ 2020-11-25T23:34:27.430908+01:00>>
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: lifetime_production - 57933
2020-11-25 23:34:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_lifetime_energy_production, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_lifetime_energy_production=57933; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Lifetime Energy Production, icon=mdi:flash @ 2020-11-25T23:34:27.431142+01:00>>
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: consumption - 499
2020-11-25 23:34:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_current_energy_consumption, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_current_energy_consumption=499; unit_of_measurement=W, friendly_name=Envoy-S meteredEnvoy Current Energy Consumption, icon=mdi:flash @ 2020-11-25T23:34:27.431340+01:00>>
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: daily_consumption - 16821
2020-11-25 23:34:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_today_s_energy_consumption, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_today_s_energy_consumption=16821; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Today's Energy Consumption, icon=mdi:flash @ 2020-11-25T23:34:27.431534+01:00>>
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: seven_days_consumption - 99297
2020-11-25 23:34:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_last_seven_days_energy_consumption, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_last_seven_days_energy_consumption=99297; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Last Seven Days Energy Consumption, icon=mdi:flash @ 2020-11-25T23:34:27.431724+01:00>>
2020-11-25 23:34:27 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: lifetime_consumption - 119838
2020-11-25 23:34:27 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_lifetime_energy_consumption, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_lifetime_energy_consumption=119838; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Lifetime Energy Consumption, icon=mdi:flash @ 2020-11-25T23:34:27.432642+01:00>>

Yeah so I see the data is coming from the API, there should be a bit more lines that say something like Updating: inverters (Serial#) - Value.

I don’t see the inverter sensors getting Added…hhmmmm…had to scroll down. :slight_smile:

Can you remove/comment out the name line from your configuration, yaml in the enphase_envoy section?

name: Envoy-S metered

2020-11-25 23:43:16 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://192.168.1.65/api/v1/production/inverters "HTTP/1.1 200 OK"

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Retrieved data from API: {'production': 15, 'consumption': 500, 'daily_production': 6468, 'daily_consumption': 16893, 'seven_days_production': 45047, 'seven_days_consumption': 99369, 'lifetime_production': 57935, 'lifetime_consumption': 119910, 'inverters_production': {'122022009125': [0, '2020-11-25 16:50:48'], '122022007165': [-1, '2020-11-25 16:41:41'], '122022010765': [0, '2020-11-25 16:49:43'], '122022007141': [-1, '2020-11-25 16:49:50'], '122022003320': [-1, '2020-11-25 16:41:45'], '122022009897': [0, '2020-11-25 16:41:54'], '122022008144': [-1, '2020-11-25 16:50:36'], '122022009149': [0, '2020-11-25 16:51:09'], '122022009197': [0, '2020-11-25 16:50:37'], '122022009871': [0, '2020-11-25 16:41:56'], '122022009122': [0, '2020-11-25 16:50:02'], '122022009124': [-1, '2020-11-25 16:50:45'], '122022009643': [0, '2020-11-25 16:36:39'], '122022009395': [0, '2020-11-25 16:41:45'], '122022009244': [-1, '2020-11-25 16:50:49'], '122022009799': [-1, '2020-11-25 16:50:58'], '122022009268': [0, '2020-11-25 16:41:49']}}

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Returning API data.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Finished fetching sensor data in 5.707 seconds

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Current Energy Production) - Type: production.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Today's Energy Production) - Type: daily_production.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Last Seven Days Energy Production) - Type: seven_days_production.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Lifetime Energy Production) - Type: lifetime_production.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Current Energy Consumption) - Type: consumption.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Today's Energy Consumption) - Type: daily_consumption.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Last Seven Days Energy Consumption) - Type: seven_days_consumption.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding sensor: Envoy-S meteredEnvoy Lifetime Energy Consumption) - Type: lifetime_consumption.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Inverter data: {'122022009125': [0, '2020-11-25 16:50:48'], '122022007165': [-1, '2020-11-25 16:41:41'], '122022010765': [0, '2020-11-25 16:49:43'], '122022007141': [-1, '2020-11-25 16:49:50'], '122022003320': [-1, '2020-11-25 16:41:45'], '122022009897': [0, '2020-11-25 16:41:54'], '122022008144': [-1, '2020-11-25 16:50:36'], '122022009149': [0, '2020-11-25 16:51:09'], '122022009197': [0, '2020-11-25 16:50:37'], '122022009871': [0, '2020-11-25 16:41:56'], '122022009122': [0, '2020-11-25 16:50:02'], '122022009124': [-1, '2020-11-25 16:50:45'], '122022009643': [0, '2020-11-25 16:36:39'], '122022009395': [0, '2020-11-25 16:41:45'], '122022009244': [-1, '2020-11-25 16:50:49'], '122022009799': [-1, '2020-11-25 16:50:58'], '122022009268': [0, '2020-11-25 16:41:49']}

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009125 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022007165 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022010765 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022007141 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022003320 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009897 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022008144 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009149 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009197 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009871 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009122 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009124 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009643 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009395 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009244 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009799 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Adding inverter SN: Envoy-S meteredEnvoy Inverter 122022009268 - Type: inverters.

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: production - 15

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_current_energy_production, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_current_energy_production=15; unit_of_measurement=W, friendly_name=Envoy-S meteredEnvoy Current Energy Production, icon=mdi:flash @ 2020-11-25T23:43:16.623712+01:00>>

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: daily_production - 6468

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_today_s_energy_production, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_today_s_energy_production=6468; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Today's Energy Production, icon=mdi:flash @ 2020-11-25T23:43:16.623946+01:00>>

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: seven_days_production - 45047

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_last_seven_days_energy_production, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_last_seven_days_energy_production=45047; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Last Seven Days Energy Production, icon=mdi:flash @ 2020-11-25T23:43:16.624168+01:00>>

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: lifetime_production - 57935

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_lifetime_energy_production, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_lifetime_energy_production=57935; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Lifetime Energy Production, icon=mdi:flash @ 2020-11-25T23:43:16.624358+01:00>>

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: consumption - 500

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_current_energy_consumption, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_current_energy_consumption=500; unit_of_measurement=W, friendly_name=Envoy-S meteredEnvoy Current Energy Consumption, icon=mdi:flash @ 2020-11-25T23:43:16.624544+01:00>>

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: daily_consumption - 16893

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_today_s_energy_consumption, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_today_s_energy_consumption=16893; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Today's Energy Consumption, icon=mdi:flash @ 2020-11-25T23:43:16.624760+01:00>>

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: seven_days_consumption - 99369

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_last_seven_days_energy_consumption, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_last_seven_days_energy_consumption=99369; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Last Seven Days Energy Consumption, icon=mdi:flash @ 2020-11-25T23:43:16.624957+01:00>>

2020-11-25 23:43:16 DEBUG (MainThread) [custom_components.enphase_envoy.sensor] Updating: lifetime_consumption - 119910

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.envoy_s_meteredenvoy_lifetime_energy_consumption, old_state=None, new_state=<state sensor.envoy_s_meteredenvoy_lifetime_energy_consumption=119910; unit_of_measurement=Wh, friendly_name=Envoy-S meteredEnvoy Lifetime Energy Consumption, icon=mdi:flash @ 2020-11-25T23:43:16.625185+01:00>>

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652698476608] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_current_energy_production", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_current_energy_production", "state": "15", "attributes": {"unit_of_measurement": "W", "friendly_name": "Envoy-S meteredEnvoy Current Energy Production", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.623712+00:00", "last_updated": "2020-11-25T22:43:16.623712+00:00", "context": {"id": "963724883fcdd96d709f69c93a1554d3", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.623712+00:00", "context": {"id": "963724883fcdd96d709f69c93a1554d3", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652698476608] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_today_s_energy_production", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_today_s_energy_production", "state": "6468", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Today's Energy Production", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.623946+00:00", "last_updated": "2020-11-25T22:43:16.623946+00:00", "context": {"id": "6735162d6e1efd5fa6e057416374ae1f", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.623946+00:00", "context": {"id": "6735162d6e1efd5fa6e057416374ae1f", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652698476608] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_last_seven_days_energy_production", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_last_seven_days_energy_production", "state": "45047", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Last Seven Days Energy Production", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624168+00:00", "last_updated": "2020-11-25T22:43:16.624168+00:00", "context": {"id": "ad0ea1593ed8e4593ff41b77c0ea3648", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624168+00:00", "context": {"id": "ad0ea1593ed8e4593ff41b77c0ea3648", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652698476608] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_lifetime_energy_production", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_lifetime_energy_production", "state": "57935", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Lifetime Energy Production", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624358+00:00", "last_updated": "2020-11-25T22:43:16.624358+00:00", "context": {"id": "9604d87ad803aa3935a2df006bec95dd", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624358+00:00", "context": {"id": "9604d87ad803aa3935a2df006bec95dd", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652698476608] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_current_energy_consumption", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_current_energy_consumption", "state": "500", "attributes": {"unit_of_measurement": "W", "friendly_name": "Envoy-S meteredEnvoy Current Energy Consumption", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624544+00:00", "last_updated": "2020-11-25T22:43:16.624544+00:00", "context": {"id": "00fa5f7e92c24154b99ceacbf4cf1fdf", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624544+00:00", "context": {"id": "00fa5f7e92c24154b99ceacbf4cf1fdf", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652698476608] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_today_s_energy_consumption", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_today_s_energy_consumption", "state": "16893", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Today's Energy Consumption", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624760+00:00", "last_updated": "2020-11-25T22:43:16.624760+00:00", "context": {"id": "2fde99be24dcb5471d155790494200c2", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624760+00:00", "context": {"id": "2fde99be24dcb5471d155790494200c2", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652698476608] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_last_seven_days_energy_consumption", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_last_seven_days_energy_consumption", "state": "99369", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Last Seven Days Energy Consumption", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624957+00:00", "last_updated": "2020-11-25T22:43:16.624957+00:00", "context": {"id": "a09ca6d3b8e2aa94940ad31c6af184b9", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624957+00:00", "context": {"id": "a09ca6d3b8e2aa94940ad31c6af184b9", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652698476608] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_lifetime_energy_consumption", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_lifetime_energy_consumption", "state": "119910", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Lifetime Energy Consumption", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.625185+00:00", "last_updated": "2020-11-25T22:43:16.625185+00:00", "context": {"id": "0c20c51e129fb5a493639362e490f68a", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.625185+00:00", "context": {"id": "0c20c51e129fb5a493639362e490f68a", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652695227408] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_current_energy_production", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_current_energy_production", "state": "15", "attributes": {"unit_of_measurement": "W", "friendly_name": "Envoy-S meteredEnvoy Current Energy Production", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.623712+00:00", "last_updated": "2020-11-25T22:43:16.623712+00:00", "context": {"id": "963724883fcdd96d709f69c93a1554d3", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.623712+00:00", "context": {"id": "963724883fcdd96d709f69c93a1554d3", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652695227408] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_today_s_energy_production", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_today_s_energy_production", "state": "6468", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Today's Energy Production", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.623946+00:00", "last_updated": "2020-11-25T22:43:16.623946+00:00", "context": {"id": "6735162d6e1efd5fa6e057416374ae1f", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.623946+00:00", "context": {"id": "6735162d6e1efd5fa6e057416374ae1f", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652695227408] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_last_seven_days_energy_production", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_last_seven_days_energy_production", "state": "45047", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Last Seven Days Energy Production", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624168+00:00", "last_updated": "2020-11-25T22:43:16.624168+00:00", "context": {"id": "ad0ea1593ed8e4593ff41b77c0ea3648", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624168+00:00", "context": {"id": "ad0ea1593ed8e4593ff41b77c0ea3648", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652695227408] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_lifetime_energy_production", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_lifetime_energy_production", "state": "57935", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Lifetime Energy Production", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624358+00:00", "last_updated": "2020-11-25T22:43:16.624358+00:00", "context": {"id": "9604d87ad803aa3935a2df006bec95dd", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624358+00:00", "context": {"id": "9604d87ad803aa3935a2df006bec95dd", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652695227408] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_current_energy_consumption", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_current_energy_consumption", "state": "500", "attributes": {"unit_of_measurement": "W", "friendly_name": "Envoy-S meteredEnvoy Current Energy Consumption", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624544+00:00", "last_updated": "2020-11-25T22:43:16.624544+00:00", "context": {"id": "00fa5f7e92c24154b99ceacbf4cf1fdf", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624544+00:00", "context": {"id": "00fa5f7e92c24154b99ceacbf4cf1fdf", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652695227408] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_today_s_energy_consumption", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_today_s_energy_consumption", "state": "16893", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Today's Energy Consumption", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624760+00:00", "last_updated": "2020-11-25T22:43:16.624760+00:00", "context": {"id": "2fde99be24dcb5471d155790494200c2", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624760+00:00", "context": {"id": "2fde99be24dcb5471d155790494200c2", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652695227408] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_last_seven_days_energy_consumption", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_last_seven_days_energy_consumption", "state": "99369", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Last Seven Days Energy Consumption", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.624957+00:00", "last_updated": "2020-11-25T22:43:16.624957+00:00", "context": {"id": "a09ca6d3b8e2aa94940ad31c6af184b9", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.624957+00:00", "context": {"id": "a09ca6d3b8e2aa94940ad31c6af184b9", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140652695227408] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "sensor.envoy_s_meteredenvoy_lifetime_energy_consumption", "old_state": null, "new_state": {"entity_id": "sensor.envoy_s_meteredenvoy_lifetime_energy_consumption", "state": "119910", "attributes": {"unit_of_measurement": "Wh", "friendly_name": "Envoy-S meteredEnvoy Lifetime Energy Consumption", "icon": "mdi:flash"}, "last_changed": "2020-11-25T22:43:16.625185+00:00", "last_updated": "2020-11-25T22:43:16.625185+00:00", "context": {"id": "0c20c51e129fb5a493639362e490f68a", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2020-11-25T22:43:16.625185+00:00", "context": {"id": "0c20c51e129fb5a493639362e490f68a", "parent_id": null, "user_id": null}}}

2020-11-25 23:43:16 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform enphase_envoy

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities

await asyncio.gather(*tasks)

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity

await entity.add_to_platform_finish()

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish

self.async_write_ha_state()

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state

self._async_write_ha_state()

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state

sstate = self.state

File "/config/custom_components/enphase_envoy/sensor.py", line 188, in state

value = self.coordinator.data.get("inverters_production").get(

TypeError: 'NoneType' object is not subscriptable

2020-11-25 23:43:16 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up enphase_envoy platform for sensor

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 207, in _async_setup_platform

await asyncio.gather(*pending)

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities

await asyncio.gather(*tasks)

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity

await entity.add_to_platform_finish()

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish

self.async_write_ha_state()

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state

self._async_write_ha_state()

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state

sstate = self.state

File "/config/custom_components/enphase_envoy/sensor.py", line 188, in state

value = self.coordinator.data.get("inverters_production").get(

TypeError: 'NoneType' object is not subscriptable

I get the same error on my system if I configure the name property for the enphase_envoy sensor. Removing the name line in the configuration.yaml ( or commenting it out ) should resolve the problem.

name: Envoy-S metered

Done

sensor:
  - platform: enphase_envoy
    ip_address: 192.168.1.65
    username: installer
    password: xxxxxxxx
    monitored_conditions:
      - production
      - daily_production
      - seven_days_production
      - lifetime_production
      - consumption
      - daily_consumption
      - seven_days_consumption
      - lifetime_consumption
      - inverters

But now the integrations fails completely.

Getting late now, tomorrow is another day :wink:

Ok, send me the debug output when you get another chance. I really want to get this to work :grimacing:

I dont know if this makes any difference.
I also have ‘scan_interval: 60’ in the config.

- platform: enphase_envoy
  name: Enphase_new
  username: !secret string_18
  password: !secret string_19
  ip_address: 192.168.1.70
  scan_interval: 60
  monitored_conditions:
    - production
    - daily_production
    - seven_days_production
    - lifetime_production
    - inverters

@codedmind Here is my card info… sorry for the delay (catching up from thanksgiving)

Consumption meter card

type: 'custom:animated-consumption-card'
entity: sensor.envoy_current_energy_consumption_kw
show_line: true
circle_color: orange

Consumption stats card

cards:
  - type: entities
    entities:
      - entity: sensor.envoy_current_energy_consumption_kw
      - entity: sensor.envoy_todays_energy_consumption_kw
      - entity: sensor.envoy_last_seven_days_energy_consumption_kw
      - entity: sensor.envoy_lifetime_energy_consumption_kw
    title: Enphase Consumption
    state_color: true
    icon: 'mdi:alpha-c-circle-outline'
  - type: divider
  - type: 'custom:mini-graph-card'
    name: Consumption
    icon: 'mdi:rotate-orbit'
    entities:
      - entity: sensor.envoy_current_energy_consumption_kw
        color: orange
        name: Current
      - entity: sensor.envoy_todays_energy_consumption_kw
        color: red
        name: Today
      - entity: sensor.envoy_last_seven_days_energy_consumption_kw
        color: magenta
        name: Last 7 Days
    hours_to_show: 96
    points_per_hour: 1
    animate: true
    height: 150
    show:
      icon_adaptive_color: true
      fill: fade
      extrema: true
type: 'custom:vertical-stack-in-card'

Production meter card

type: 'custom:animated-consumption-card'
entity: sensor.envoy_current_energy_production_kw
show_line: true
circle_color: magenta
left_icon: 'mdi:solar-power'
right_icon: 'mdi:home'

Production stats card

cards:
  - type: entities
    entities:
      - entity: sensor.envoy_current_energy_production_kw
      - entity: sensor.envoy_todays_energy_production_kw
      - entity: sensor.envoy_last_seven_days_energy_production_kw
      - entity: sensor.envoy_lifetime_energy_production_kw
    title: Enphase Production
    state_color: true
    icon: 'mdi:alpha-p-circle-outline'
  - type: divider
  - type: 'custom:mini-graph-card'
    name: Production
    icon: 'mdi:solar-power'
    entities:
      - entity: sensor.envoy_current_energy_production_kw
        color: purple
        name: Current
      - entity: sensor.envoy_todays_energy_production_kw
        color: pink
        name: Today
      - entity: sensor.envoy_last_seven_days_energy_production_kw
        color: teal
        name: Last 7 Days
    hours_to_show: 96
    points_per_hour: 1
    animate: true
    height: 150
    show:
      icon_adaptive_color: true
      fill: fade
      extrema: true
type: 'custom:vertical-stack-in-card'

2 Likes

Next item…
I logged in this morning and noticed all my inverter sensors are not present
Anyone else have this happen? NM, a simple restart corrected this. Unsure how/why that happened, but moving past it for now.

My PR is still being reviewed and a couple more changes were requested. The main fix was to catch errors using try/except rather than string matching. I did fix the issue where the Envoy integration would fail if the name attribute had a value that contained a space, when configuring the Enphase Envoy sensor in your configuration.yaml

The updated files are located here: sensor.py and manifest.json

One more update. These changes mainly from suggested code changes also a bug I found:

  • Replaced deprecated requests_async library with httpx
  • Error checking
  • Fixed a bug that was introduced in envoy_reader v0.17.0 that caused the sensor to break with older Envoys running Firmware < 3.9

The updated files are located here: sensor.py and manifest.json