HASwitchPlate / openHASP-custom-component

Home Assistant custom component for openHASP
https://www.openhasp.com
MIT License
51 stars 12 forks source link

Issue after Updating to HA 2024.6.0 #127

Closed TNTLarsn closed 4 months ago

TNTLarsn commented 5 months ago

After upgrading to HA 2024.6.0 all Display related entities where unavailable. I had to reload the configuration of every display by hand in order to get it to work again. Also logging errors (see further down) appeared.

Version of the custom_component

0.7.2

Configuration

shorten because of:

There was an error creating your Issue: body is too long (maximum is 65536 characters).


openhasp:
  bad:
    objects:
      # SEITE 0
      - obj: "p0b0" # SETTINGS
        properties:
          "bg_color" : "{% from 'openhasp.jinja' import color %}{{color('bg')}}"
      - obj: "p0b1" # PREVIOUS - BUTTON"
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(2)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(11)}}"
          "text": "\uE04D"
          "radius": "{% from 'openhasp.jinja' import grid %} {{(grid() | from_json).radius |int}}"
          "bg_color": "{% from 'openhasp.jinja' import color %}{{color('primary')}}"
          "bg_color02": "{% from 'openhasp.jinja' import color %}{{color('primary_light')}}"
      - obj: "p0b2" # HOME - BUTTON
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(2)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(11)}}"
          "text": "\uE6A1"
          "radius": "{% from 'openhasp.jinja' import grid %} {{(grid() | from_json).radius |int}}"
          "bg_color": "{% from 'openhasp.jinja' import color %}{{color('primary')}}"
          "bg_color02": "{% from 'openhasp.jinja' import color %}{{color('primary_light')}}"
      - obj: "p0b3" # NEXT - BUTTON
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(2)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(11)}}"
          "radius": "{% from 'openhasp.jinja' import grid %} {{(grid() | from_json).radius |int}}"
          "text": "\uE054"
          "bg_color": "{% from 'openhasp.jinja' import color %}{{color('primary')}}"   
          "bg_color02": "{% from 'openhasp.jinja' import color %}{{color('primary_light')}}"  

      # SEITE 1
      - obj: "p1b0" # SETTINGS
        properties:
          "bg_color" : "{% from 'openhasp.jinja' import color %}{{color('bg')}}"
      - obj: "p1b2" # WETTER - CONTAINER
        properties:
          "w": "{% from 'openhasp.jinja' import grid %} {{(grid() | from_json).display_width}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(10)}}"
          "x": 0
          "y": 0
      - obj: "p1b10" # CONTAINER - TABVIEW
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(12)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(10)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(1)}}"
        event:
          "changed":
            - service: openhasp.command
              target:
                entity_id: openhasp.bad
              data:
                keyword: p1b19.text
                parameters: >
                  {% if val == 0 %}
                  {{ "#ffffff \u2022# #909090 \u2022#" | e }}
                  {%-elif val == 1 %}
                  {{ "#909090 \u2022# #ffffff \u2022#" | e }}
                  {% endif %}    
      - obj: "p1b14" # WETTER IMAGE
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(4)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(2)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(1)}}"
          "src": "{{ 'http://' + states('sensor.local_ip') + ':8123/local/images/openhasp-weathericons-night/z-128-' + states('weather.home') + '.png' }}"
      - obj: "p1b15" # DATUM LABEL
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(8)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(1)}}"
          "text": >-
            {% import 'date_and_time.jinja' as func %}
            {{- func.weekday()|string + ' ' + now().day|string + '.' + func.month()|string -}}
      - obj: "p1b16" # TEMPERATUR - LABEL
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(8)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(2)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(2)}}"
          "text": "{{state_attr('weather.home', 'temperature')}} °C"
          "align": "center"
      - obj: "p1b17" # CONDITION - LABEL
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(8)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(2)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(3)}}"
          "text": "{{ state_translated('weather.home') }}"
          "align": "center"
      - obj: "p1b19" # DOTS - LABEL
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(10)}}"
          "align": "center"
      - obj: "p1b21" # TAB1 - LABEL HOUR+2
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(6)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(5)}}"
          "align": "right"
      - obj: "p1b22" # TAB1 - LABEL TEMP+2
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(5)}}"
          "align": "center"
      - obj: "p1b23" # TAB1 - LABEL ICON+2
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(5)}}"
      - obj: "p1b31" # TAB1 - LABEL HOUR+3
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(6)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(6)}}"
          "align": "right"
      - obj: "p1b32" # TAB1 - LABEL TEMP+3
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(6)}}"
          "align": "center"
      - obj: "p1b33" # TAB1 - LABEL ICON+3
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(6)}}"
      - obj: "p1b41" # TAB1 - LABEL HOUR+4
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(6)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(7)}}"
          "align": "right"
      - obj: "p1b42" # TAB1 - LABEL TEMP+4
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(7)}}"
          "align": "center"
      - obj: "p1b43" # TAB1 - LABEL ICON+4
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(7)}}"
      - obj: "p1b51" # TAB1 - LABEL HOUR+5
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(6)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(8)}}"
          "align": "right"
      - obj: "p1b52" # TAB1 - LABEL TEMP+5
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(8)}}"
          "align": "center"
      - obj: "p1b53" # TAB1 - LABEL ICON+5
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(8)}}"
      - obj: "p1b61" # TAB1 - LABEL HOUR+6
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(6)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(9)}}"
          "align": "right"
      - obj: "p1b62" # TAB1 - LABEL TEMP+6
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(9)}}"
          "align": "center"
      - obj: "p1b63" # TAB1 - LABEL ICON+6
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(9)}}"
      - obj: "p1b64" # TAB2 - LABEL TAG+1
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(5)}}"
          "align": "right"
      - obj: "p1b65" # TAB2 - LABEL TEMPLOW+1
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(5)}}"
          "align": "center"
      - obj: "p1b66" # TAB2 - LABEL TEMPHIGH+1
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(5)}}"
          "align": "center"
      - obj: "p1b67" # TAB2 - LABEL ICON+1
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(5)}}"
      - obj: "p1b74" # TAB2 - LABEL TAG+2
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(6)}}"
          "align": "right"
      - obj: "p1b75" # TAB2 - LABEL TEMPLOW+2
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(6)}}"
          "align": "center"
      - obj: "p1b76" # TAB2 - LABEL TEMPHIGH+2
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(6)}}"
          "align": "center"
      - obj: "p1b77" # TAB2 - LABEL ICON+2
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(6)}}"
      - obj: "p1b84" # TAB2 - LABEL TAG+3
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(7)}}"
          "align": "right"
      - obj: "p1b85" # TAB2 - LABEL TEMPLOW+3
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(7)}}"
          "align": "center"
      - obj: "p1b86" # TAB2 - LABEL TEMPHIGH+3
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(7)}}"
          "align": "center"
      - obj: "p1b87" # TAB2 - LABEL ICON+3
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(7)}}"
      - obj: "p1b94" # TAB2 - LABEL TAG+4
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(8)}}"
          "align": "right"
      - obj: "p1b95" # TAB2 - LABEL TEMPLOW+4
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(8)}}"
          "align": "center"
      - obj: "p1b96" # TAB2 - LABEL TEMPHIGH+4
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(8)}}"
          "align": "center"
      - obj: "p1b97" # TAB2 - LABEL ICON+4
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(8)}}"
      - obj: "p1b104" # TAB2 - LABEL TAG+5
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(4)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(1)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(9)}}"
          "align": "right"
      - obj: "p1b105" # TAB2 - LABEL TEMPLOW+5
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(5)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(9)}}"
          "align": "center"   
      - obj: "p1b106" # TAB2 - LABEL TEMPHIGH+5
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(2)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(7)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(9)}}"
          "align": "center"
      - obj: "p1b107" # TAB2 - LABEL ICON+2
        properties:
          "w": "{% import 'openhasp.jinja' as grid %}{{grid.w(1)}}"
          "h": "{% import 'openhasp.jinja' as grid %}{{grid.h(1)}}"
          "x": "{% import 'openhasp.jinja' as grid %}{{grid.x(9)}}"
          "y": "{% import 'openhasp.jinja' as grid %}{{grid.y(9)}}"

...

Describe the bug

A clear and concise description of what the bug is.

Debug log


Logger: homeassistant.util.loop
Quelle: util/loop.py:84
Erstmals aufgetreten: 22:04:06 (6 Vorkommnisse)
Zuletzt protokolliert: 22:04:21

Detected blocking call to open inside the event loop by custom integration 'openhasp' at custom_components/openhasp/__init__.py, 
line 347: with open( (offender: /config/custom_components/openhasp/__init__.py, 
line 347: with open(), please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues Traceback (most recent call last): File "<frozen runpy>", 
line 198, in _run_module_as_main File "<frozen runpy>", 
line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", 
line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", 
line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", 
line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", 
line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", 
line 452, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", 
line 543, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", 
line 114, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", 
line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", 
line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", 
line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", 
line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", 
line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", 
line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", 
line 73, in handle result = await handler(request, **request.match_info) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", 
line 120, in post await hass.config_entries.async_reload(entry_id) File "/usr/src/homeassistant/homeassistant/config_entries.py", 
line 1897, in async_reload return await self.async_setup(entry_id, _lock=False) File "/usr/src/homeassistant/homeassistant/config_entries.py", 
line 1821, in async_setup await entry.async_setup(self.hass) File "/usr/src/homeassistant/homeassistant/config_entries.py", 
line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/openhasp/__init__.py", 
line 263, in async_setup_entry plate_entity = SwitchPlate(hass, config, entry) File "/config/custom_components/openhasp/__init__.py", 
line 347, in __init__ with open(

Detected blocking call to open inside the event loop by custom integration 'openhasp' at custom_components/openhasp/__init__.py, 
line 653: with open(path, "r") as pages_file: (offender: /config/custom_components/openhasp/__init__.py, 
line 653: with open(path, "r") as pages_file:), please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues Traceback (most recent call last): File "<frozen runpy>", 
line 198, in _run_module_as_main File "<frozen runpy>", 
line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", 
line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", 
line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", 
line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", 
line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", 
line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", 
line 577, in _async_reader_callback if (status := client.loop_read(MAX_PACKETS_TO_READ)) != 0: File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", 
line 1556, in loop_read rc = self._packet_read() File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", 
line 2439, in _packet_read rc = self._packet_handle() File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", 
line 3033, in _packet_handle return self._handle_publish() File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", 
line 3327, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", 
line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", 
line 1193, in _async_mqtt_on_message self.hass.async_run_hass_job(job, receive_msg) File "/usr/src/homeassistant/homeassistant/core.py", 
line 939, in async_run_hass_job return self._async_add_hass_job(hassjob, *args, background=background) File "/usr/src/homeassistant/homeassistant/core.py", 
line 748, in _async_add_hass_job task = create_eager_task( File "/usr/src/homeassistant/homeassistant/util/async_.py", 
line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/util/logging.py", 
line 105, in _async_wrapper await async_func(*args) File "/config/custom_components/openhasp/__init__.py", 
line 476, in lwt_message_received await self.async_load_page(self._pages_jsonl) File "/config/custom_components/openhasp/__init__.py", 
line 653, in async_load_page with open(path, "r") as pages_file:
dgomes commented 5 months ago

123 should address this issue

adorobis commented 4 months ago

Any plans on when this will be released?

fvanroie commented 4 months ago

I created pre-release 0.7.3 please test and report here.

kydang789 commented 4 months ago

After restart, write automation do reload config is ok

After you make changes to the configuration of the plate you can apply them by either restarting Home Assistant or by reloading the integration from Lovelace user interface with option found in Configuration > Devices & Services > openHASP > (your plate >) 3dots menu > Reload. Note that this has to be done individually for each configured plate.

After you make changes to the configuration of the plate you can apply them by either restarting Home Assistant or by reloading the integration from Lovelace user interface with option found in Configuration > Devices & Services > openHASP > (your plate >) 3dots menu > Reload. Note that this has to be done individually for each configured plate.

You can achieve the same by with a service too:

service: homeassistant.reload_config_entry data: entry_id: 95f7d6fe3fa5f4e242797e9ae4a5dd1d

With the entry_id found in .storage/core.config_entries file from your main Home Assistant configuration directory (do NOT edit this file!).

TNTLarsn commented 4 months ago

@kydang789 I know that is what i did. before 0.7.3

@fvanroie It seems that 0.7.3 fixes the issue. Thanks

adorobis commented 4 months ago

So far so good :) No need to reload integration anymore. Many thanks!

fvanroie commented 4 months ago

Thanks for the feedback, I release 0.7.3 of the custom component in the wild 🤞