Adds services for home assistant registry operations
Go to file
github-actions[bot] e3dac899a6
Merge pull request #288 from amosyuen/dependabot/pip/pytest-homeassistant-custom-component-0.13.124
Bump pytest-homeassistant-custom-component from 0.13.123 to 0.13.124
2024-05-20 15:56:28 +00:00
.devcontainer Use prettier and set some testing config 2023-01-21 23:09:55 +00:00
.github Bump pre-commit from 3.7.0 to 3.7.1 in /.github/workflows 2024-05-13 15:38:59 +00:00
.vscode Use prettier and set some testing config 2023-01-21 23:09:55 +00:00
custom_components Sort manifest lines 2023-02-27 01:22:42 +00:00
tests Initial commit 2023-01-21 10:08:32 +00:00
.gitattributes Initial commit 2023-01-19 09:32:21 +00:00
.gitignore Initial commit 2023-01-19 09:32:21 +00:00
.pre-commit-config.yaml Initial commit 2023-01-19 09:32:21 +00:00
CONTRIBUTING.md Initial commit 2023-01-19 09:32:21 +00:00
LICENSE Initial commit 2023-01-19 09:32:21 +00:00
README.md Remove custom repository instructions now that ha-registry is in HACS 2023-02-21 20:19:09 -08:00
hacs.json Initial commit 2023-01-21 10:08:32 +00:00
pytest.ini Initial commit 2023-01-21 10:08:32 +00:00
requirements_dev.txt Bump homeassistant from 2023.12.3 to 2023.12.4 2023-12-27 15:47:46 +00:00
requirements_test.txt Bump pytest-homeassistant-custom-component from 0.13.123 to 0.13.124 2024-05-20 15:56:15 +00:00
setup.cfg Use prettier and set some testing config 2023-01-21 23:09:55 +00:00

README.md

Home Assistant Registry

GitHub Release GitHub Activity License

pre-commit Black

hacs Project Maintenance BuyMeCoffee

Community Forum

Description

Adds services for home assistant registry operations.

WARNING: These are low level APIs that only have basic validation. They are intended for power users. Misuse could result in entities getting into strange states.

HA core has decided to not support services for common registry operations mentioned in https://github.com/home-assistant/core/pull/86281#event-8320797538.

Services

Remove Entity

Remove all targeted entity registry configs,

entity_id is a repeated field that takes comma separated values in a string or a yaml list

service: ha_registry.remove_entity
data:
  entity_id:
    - sensor.bathroom_temperature
    - sensor.bedroom_temperature

Update Entity

Updates all targeted entity registry configs to the specified values.

entity_id and aliases are repeated fields that take comma separated values in a string or a yaml list

service: ha_registry.update_entity
data:
  entity_id: sensor.bathroom_temperature,sensor.bedroom_temperature
  aliases:
    - Alias1
    - Alias2
  area_id: bedroom
  device_class: temperature
  disabled: true
  hidden: true
  icon: mdi:home
  name: Bedroom Temperature
  new_entity_id: sensor.new_entity_id
  options_domain: sensor
  options:
    unit_of_measurement: °F

{% if not installed %}

Installation

HACS

  1. Install HACS
  2. Go to HACS "Integrations >" section
  3. In the lower right click "+ Explore & Download repositories"
  4. Search for "Home Assistant Registry" and add it
    • HA Restart is not needed since it is configured in UI config flow
  5. In the Home Assistant (HA) UI go to "Configuration"
  6. Click "Integrations"
  7. Click "+ Add Integration"
  8. Search for "Home Assistant Registry"

Manual

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called ha_registry.
  4. Download all the files from the custom_components/ha_registry/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the Home Assistant (HA) UI go to "Configuration"
  8. Click "Integrations"
  9. Click "+ Add Integration"
  10. Search for "Home Assistant Registry"

{% endif %}

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Credits

Code template was mainly taken from @Ludeeus's integration_blueprint template