Closed kaijk closed 2 years ago
I'm not sure you can install this as custom repo (because it's a python script, could be handled differently by hacs).
I tried to install it the usual way and it works (tested with hacs 1.24.5 and hassio 2022.4.5).
If you didn't find the repo in hacs, then ensure you have python scripts enabled:
configuration.yaml
python_script:
if it's missingMea culpa. I must have needed a restart or two.
Quick question, What do you recommend to keep the entities from updating on their own, and thereby only via the script? (I want to add/update a persistent attribute on my own schedule and find that it gets overwritten once a minute by HA). I'm toying with using a trigger that will never fire in the sensor definition.. Any other ideas?
On Mon, Apr 18, 2022 at 11:23 AM Paolo Mazzini @.***> wrote:
I'm not sure you can install this as custom repo (because it's a python script, could be handled differently by hacs).
I tried to install it the usual way and it works (tested with hacs 1.24.5 and hassio 2022.4.5).
If you didn't find the repo in hacs, then ensure you have python scripts enabled:
- Edit your configuration.yaml
- Add python_script: if it's missing https://hacs.xyz/docs/categories/python_scripts#enable-python-scripts-in-home-assistant
- Restart hassio and search again in hacs (Hacs -> Automation -> Add Repository -> Check 'Python Script' below the search box) [image: image] https://user-images.githubusercontent.com/44721151/163854922-db9f6b6d-2cc7-4ebc-9835-4252422867a7.png
- Install it
— Reply to this email directly, view it on GitHub https://github.com/pmazz/ps_hassio_entities/issues/6#issuecomment-1101631057, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2THYVS25ZLN5HRPNTXXKLVFWSCXANCNFSM5TO2LPLA . You are receiving this because you authored the thread.Message ID: @.***>
I would go for an automation triggered by attribute changes. When your attribute is overwritten then you change it back to your desired value. Check here: https://www.home-assistant.io/docs/automation/trigger/#triggering-on-attribute-changes
It should be something like this:
automation:
trigger:
- platform: state
entity_id: sensor.mysensor
attribute: myattribute
action:
- service: python_script.hass_entities
data:
action: set_attributes
entity_id: sensor.mysensor
attributes:
- myattribute: "my value"
(I didn't test the code)
Bug When adding this repository as a custom repository in HACS, the process fails with the message; Repository structure for v1.1.0 is not compliant (HACS version 1.24.5 - current)
To Reproduce Attempt to add the repository to HACS as a custom repository (Note, the repository is not found in the base HACS components list
Expected behavior The repository is added to hacs
YAML configuration