Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to finish integration #3

Open
fulup-bzh opened this issue Oct 15, 2022 · 1 comment
Open

Fail to finish integration #3

fulup-bzh opened this issue Oct 15, 2022 · 1 comment

Comments

@fulup-bzh
Copy link

Just reinstalled a fresh HA and tried this extension with no success:

Despite the modification on configuration (see here after remarks) the extension does not start

 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: sensor.enedis
2022-10-15 19:40:22.388 WARNING (MainThread) [homeassistant.components.sensor] Timed out adding entities for domain sensor with platform enedis after 500s
2022-10-15 19:40:22.429 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{ states.sensor.enedis_teleinfo.attributes["PRM"] }}")
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/template.py", line 420, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/template.py", line 1915, in _render_with_context
    return template.render(**kwargs)
  File "/srv/homeassistant/lib/python3.9/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/srv/homeassistant/lib/python3.9/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/srv/homeassistant/lib/python3.9/site-packages/jinja2/sandbox.py", line 303, in getitem

Note that documentation should be updated:

  • extension name is ENEDIS but config sample still point on TELEINFO
    • replace 1st line "plateform: teleinfo" with "plateform: enedis"
  • When using default Rasbery TTY port, console should be stop and homeassistant user should be able to access group tty
@fulup-bzh
Copy link
Author

Few progress:

  • it is not enough to remove systemctl stop [email protected]
  • should also remove serial console from /boot/cmdline.txt otherwise agetty restart aumatically
  • without agetty in place /dev/ttyAMA0 below to 'dialout' group also homeassistant should have access to this group
  • usermod -a -G dialout homeassistant

I now see Enedis-Teleinfo, nevertheless I still get an error within the log

2022-10-21 12:26:00.250 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.enedis_teleinfo fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 710, in async_device_update
    raise exc
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/teleinfo/sensor.py", line 122, in update
    _LOGGER.debug(" Got : [%s] =  (%s)", name, value)
UnboundLocalError: local variable 'name' referenced before assignment
2022-10-21 12:27:00.191 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.enedis_teleinfo fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 710, in async_device_update
    raise exc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant