Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable automatic tag addition #221

Open
tempod opened this issue Jan 3, 2023 · 2 comments
Open

disable automatic tag addition #221

tempod opened this issue Jan 3, 2023 · 2 comments

Comments

@tempod
Copy link

tempod commented Jan 3, 2023

related to this issue (#189) I have an update. Only now I was able to do some tests but now if I don't activate the switch to add tags it doesn't read anything

@adonno
Copy link
Owner

adonno commented Jan 6, 2023

indeed, that is the case based on your script. i am not sure how one could disable automatic tag addition, that is a thing managed by HA

@36grad
Copy link

36grad commented May 15, 2023

Adding tags is done by home assistant's tag component.
To work around this, I have installed the tag component as a custom component and then commented out the line that adds the tag to home assistant. It can be found in the file __init__.py in the function async_scan_tag which is located almost at the end of the file.
Here you need to comment out the else part (for me that's line 128 and 129).

if tag_id in helper.data:
    await helper.async_update_item(tag_id, {LAST_SCANNED: dt_util.utcnow()})
#else:
    #await helper.async_create_item({TAG_ID: tag_id, LAST_SCANNED: dt_util.utcnow()})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants