{"id":40420522,"url":"https://github.com/mykhailog/hacs_waveshare_ups_hat","last_synced_at":"2026-01-20T15:07:29.839Z","repository":{"id":43998541,"uuid":"356078871","full_name":"mykhailog/hacs_waveshare_ups_hat","owner":"mykhailog","description":" Waveshare UPS Hat integration for Home Assistant.","archived":false,"fork":false,"pushed_at":"2025-01-29T11:47:09.000Z","size":20,"stargazers_count":20,"open_issues_count":11,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T12:32:44.277Z","etag":null,"topics":["hacs","homeassistant","ups"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mykhailog.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-08T23:52:23.000Z","updated_at":"2025-01-29T12:26:08.000Z","dependencies_parsed_at":"2025-01-29T12:27:16.218Z","dependency_job_id":"9977b2f6-863d-43b4-b886-db3e56320812","html_url":"https://github.com/mykhailog/hacs_waveshare_ups_hat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mykhailog/hacs_waveshare_ups_hat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mykhailog%2Fhacs_waveshare_ups_hat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mykhailog%2Fhacs_waveshare_ups_hat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mykhailog%2Fhacs_waveshare_ups_hat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mykhailog%2Fhacs_waveshare_ups_hat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mykhailog","download_url":"https://codeload.github.com/mykhailog/hacs_waveshare_ups_hat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mykhailog%2Fhacs_waveshare_ups_hat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28606139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T14:45:23.139Z","status":"ssl_error","status_checked_at":"2026-01-20T14:44:16.929Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacs","homeassistant","ups"],"created_at":"2026-01-20T15:07:29.062Z","updated_at":"2026-01-20T15:07:29.827Z","avatar_url":"https://github.com/mykhailog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n# Waveshare UPS HAT Integration for Home Assistant\n\nThis integration allows you to monitor [Waveshare UPS Hat](https://www.waveshare.com/wiki/UPS_HAT) status in your Home Assistant instance.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/1454659/114266149-595d6280-99fd-11eb-9056-dd0fbe178ecc.png\" width=\"400\" /\u003e\n\n\n\n## Installation\n### HACS\nIf you use [HACS](https://hacs.xyz/) you can install and update this component.\n1. Go into HACS -\u003e CUSTOM REPOSITORIES and add url: https://github.com/mykhailog/hacs_waveshare_ups_hat with type \"integration\"\n2. Go to integration, search \"waveshare_ups_hat\" and click *Install*.\n\n\n### Manual\nDownload and unzip or clone this repository and copy `custom_components/waveshare_ups_hat/` to your configuration directory of Home Assistant, e.g. `~/.homeassistant/custom_components/`.\n\nIn the end your file structure should look like that:\n```\n~/.homeassistant/custom_components/waveshare_ups_hat/__init__.py\n~/.homeassistant/custom_components/waveshare_ups_hat/manifest.json\n~/.homeassistant/custom_components/waveshare_ups_hat/sensor.py\n~/.homeassistant/custom_components/waveshare_ups_hat/binary_sensor.py\n~/.homeassistant/custom_components/waveshare_ups_hat/const.py\n~/.homeassistant/custom_components/waveshare_ups_hat/ina219.py\n```\n\n## Configuration\n### Sensor\nCreate a new sensor entry in your `configuration.yaml` \n\n```yaml\nsensor:\n  - platform: waveshare_ups_hat\n    name: UPS                    # Optional\n    unique_id: waveshare_ups     # Optional\n```\nFollowing data can be read:\n - SoC (State of Charge)\n - PSU Voltage\n - Shunt Voltage\n - Current\n - Power\n - Charging Status\n - Online Status\n - Is Low Battery (\u003c 20%)\n\nIf you consistently experience capacity below 100% when the device is fully charged, you can adjust it using the `max_soc` property.\n\n```yaml\nsensor:\n  - platform: waveshare_ups_hat\n    max_soc: 91                      \n```\n\n### Binary Sensor\nIn addition to the  sensor devices, you may also create a device which is simply “on” when the UPS status is online and “off” at all other times.\n\n```yaml\nbinary_sensor:\n  - platform: waveshare_ups_hat\n```\n\n## Directions for installing smbus support on Raspberry Pi\n\n### HassOS\n\nTo enable i2c in Home Assistant OS System follow this [instruction](https://www.home-assistant.io/common-tasks/os/#enable-i2c) or\nuse this [addon](https://community.home-assistant.io/t/add-on-hassos-i2c-configurator/264167)\n\n### Home Asisstant Core\n\nEnable I2c interface with the Raspberry Pi configuration utility:\n\n```bash\n# pi user environment: Enable i2c interface\n$ sudo raspi-config\n```\n\nSelect `Interfacing options-\u003eI2C` choose `\u003cYes\u003e` and hit `Enter`, then go to `Finish` and you'll be prompted to reboot.\n\nInstall dependencies for use the `smbus-cffi` module and enable your `homeassistant` user to join the _i2c_ group:\n\n```bash\n# pi user environment: Install i2c dependencies and utilities\n$ sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev\n\n# pi user environment: Add homeassistant user to the i2c group\n$ sudo addgroup homeassistant i2c\n\n# pi user environment: Reboot Raspberry Pi to apply changes\n$ sudo reboot\n```\n\n#### Check the i2c address of the sensor\n\nAfter installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors:\n\n```bash\n/usr/sbin/i2cdetect -y 1\n```\n\nIt will output a table like this:\n\n```text\n     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f\n00:          -- -- -- -- -- -- -- -- -- -- -- -- --\n10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --\n30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n40: 40 -- -- -- -- -- UU -- -- -- -- -- -- -- -- --\n50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n70: -- -- -- -- -- -- -- 77\n```\n\n## License\nMIT 2023","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmykhailog%2Fhacs_waveshare_ups_hat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmykhailog%2Fhacs_waveshare_ups_hat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmykhailog%2Fhacs_waveshare_ups_hat/lists"}