Code Monkey home page Code Monkey logo

home-assistant-custom-components-hydro-imgw's Introduction

stars_badge followers_badge Community Forum Ko-Fi buycoffee.to PayPal.Me Revolut.Me

GitHub stats

Custom components

Name Stars Version HACS support Downloads Last commit Forum
Antistorm stars_badge release_badge HACS Default Downloads Last commit
Burze.dzis.net stars_badge release_badge HACS Default Downloads Last commit
Custom Templates stars_badge release_badge HACS Default Downloads Last commit community_badge
Dom 5 stars_badge release_badge HACS Custom Downloads Last commit
Froggy stars_badge release_badge HACS Custom Downloads Last commit
GNE Photovoltaic Monitoring stars_badge release_badge HACS Default Downloads Last commit
Google Keep stars_badge release_badge HACS Default Downloads Last commit community_badge
Hydro IMGW stars_badge release_badge HACS Custom Downloads Last commit
iMPK stars_badge release_badge HACS Default Downloads Last commit
Looko2 stars_badge release_badge HACS Default Downloads Last commit
MPK Łódź stars_badge release_badge HACS Custom Downloads Last commit
MPK Kraków stars_badge release_badge HACS Custom Downloads Last commit
MPK Rzeszów stars_badge release_badge HACS Custom Downloads Last commit
Rozkładzik stars_badge release_badge HACS Default Downloads Last commit
Saver stars_badge release_badge HACS Default Downloads Last commit community_badge
SmartThings Soundbar stars_badge release_badge HACS Custom Downloads Last commit
Tauron AMIplus stars_badge release_badge HACS Default Downloads Last commit
Xiaomi Cloud Map Extractor stars_badge release_badge HACS Default Downloads Last commit Community Forum
Xiaomi Vacuum Map Camera stars_badge release_badge HACS Custom Downloads Last commit

Custom Lovelace cards

Name Stars Version HACS support Downloads Last commit Forum
Google Keep card stars_badge release_badge HACS Default Last commit community_badge
HTML card stars_badge release_badge HACS Default Last commit
HTML Jinja2 Template card stars_badge release_badge HACS Default Last commit community_badge
Local Conditional card stars_badge release_badge HACS Default Downloads Last commit community_badge
Nixie card stars_badge release_badge HACS Custom Downloads Last commit
Nixie Clock card stars_badge release_badge HACS Custom Downloads Last commit
Xiaomi Vacuum Map card stars_badge release_badge HACS Default Downloads Last commit community_badge

Clients

Name Stars Version Downloads Last commit Forum
Home Assistant Taskbar Menu stars_badge release_badge Downloads Last commit Community Forum

Picture-elements cards

Name Stars Last commit
Xiaomi Vacuum Black card stars_badge Last commit

Others

Name Stars Version Downloads Last commit Forum
Xiaomi Vacuum garage stars_badge Last commit community_badge
Xiaomi Cloud Token Extractor stars_badge release_badge Downloads Last commit

Support

If you want to support my work with a donation you can use one of the following platforms:

Platform Payment methods Link Comment
Ko-fi
  • PayPal
  • Credit card
  • Buy Me a Coffee at ko-fi.com
  • No fees
  • Single or monthly payment
  • buycoffee.to
  • BLIK
  • Bank transfer
  • Postaw mi kawę na buycoffee.to
    PayPal
  • PayPal
  • PayPal Logo
  • No fees
  • Revolut
  • Revolut
  • Credit Card
  • Revolut
  • No fees
  • home-assistant-custom-components-hydro-imgw's People

    Stargazers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    Watchers

     avatar  avatar  avatar  avatar  avatar

    home-assistant-custom-components-hydro-imgw's Issues

    Error adding entities

    Hi there @PiotrMachowski,
    I've made installation via HACS and cannot get any enitities.

    hydro_imgw sensor in configuration.yaml looks like:

      - platform: hydro_imgw
        name: Pilica
        station_id: "250190210"
    
    

    Logger: homeassistant.components.sensor
    Source: custom_components/hydro_imgw/sensor.py:93
    Integration: Sensor (documentation, issues)
    First occurred: 14:38:37 (2 occurrences)
    Last logged: 14:38:39

    Error adding entities for domain sensor with platform hydro_imgw
    Error while setting up hydro_imgw platform for sensor
    Traceback (most recent call last):
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
    File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 799, in add_to_platform_finish
    self.async_write_ha_state()
    File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
    File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state
    state = self._stringify_state(available)
    File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state
    if (state := self.state) is None:
    File "/config/custom_components/hydro_imgw/sensor.py", line 53, in state
    self._state = HydroImgwSensor.extractor(self._data, "status.currentState.value")
    File "/config/custom_components/hydro_imgw/sensor.py", line 95, in extractor
    return extractor_arr(json, path.split("."))
    File "/config/custom_components/hydro_imgw/sensor.py", line 92, in extractor_arr
    return extractor_arr(json_obj[path_array[0]], path_array[1:])
    File "/config/custom_components/hydro_imgw/sensor.py", line 92, in extractor_arr
    return extractor_arr(json_obj[path_array[0]], path_array[1:])
    File "/config/custom_components/hydro_imgw/sensor.py", line 93, in extractor_arr
    return json_obj[path_array[0]]
    TypeError: 'NoneType' object is not subscriptable

    hydro_imgw: Error on device update!

    Hi Piotr, I need to raise the issue which comes after HA update(2021.9.0). Error log as follows:

    First occurred: 13:07:15 (1 occurrences)
    Last logged: 13:07:15
    
    hydro_imgw: Error on device update!
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
        conn = connection.create_connection(
      File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
        raise err
      File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
        sock.connect(sa)
    TimeoutError: [Errno 110] Operation timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
        httplib_response = self._make_request(
      File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
        self._validate_conn(conn)
      File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
        conn.connect()
      File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
        conn = self._new_conn()
      File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
        raise NewConnectionError(
    urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f71b25a50a0>: Failed to establish a new connection: [Errno 110] Operation timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
        resp = conn.urlopen(
      File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
        retries = retries.increment(
      File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='hydro.imgw.pl', port=443): Max retries exceeded with url: /api/station/hydro/?id=152210170 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f71b25a50a0>: Failed to establish a new connection: [Errno 110] Operation timed out'))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
        await entity.async_device_update(warning=False)
      File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 633, in async_device_update
        await task
      File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/config/custom_components/hydro_imgw/sensor.py", line 84, in update
        request = requests.get(address, headers=headers)
      File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 76, in get
        return request('get', url, params=params, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
        return session.request(method=method, url=url, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
        resp = self.send(prep, **send_kwargs)
      File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
        r = adapter.send(request, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
        raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: HTTPSConnectionPool(host='hydro.imgw.pl', port=443): Max retries exceeded with url: /api/station/hydro/?id=152210170 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f71b25a50a0>: Failed to establish a new connection: [Errno 110] Operation timed out'))
    

    Error after upgrading to OS 5.9

    After upgrading HA OS from 5.8 to 5.9 the sensor stopped working.

    Config.YAML:

    - platform: hydro_imgw
      station_id: "152210170"
    

    Error message:

    File "/config/custom_components/hydro_imgw/sensor.py", line 53, in state
    self._state = HydroImgwSensor.extractor(self._data, "status.currentValue")
    File "/config/custom_components/hydro_imgw/sensor.py", line 95, in extractor
    return extractor_arr(json, path.split("."))
    File "/config/custom_components/hydro_imgw/sensor.py", line 92, in extractor_arr
    return extractor_arr(json_obj[path_array[0]], path_array[1:])
    File "/config/custom_components/hydro_imgw/sensor.py", line 93, in extractor_arr
    return json_obj[path_array[0]]
    KeyError: 'currentValue'
    

    What can be done to fix it ?

    Change name of attribute "state"

    67 - "state": "state",
    67 + "level": "state",

    One of the name of the attributes is "state". I ask to change it into "level" or something similar because when using mqtt_statestream its value is replaced with the state of the entity.

    Tried to pull request, but it's not possible.

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.