-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat:add support to store multiple commands in NFC card #18
base: main
Are you sure you want to change the base?
feat:add support to store multiple commands in NFC card #18
Conversation
…eparated by line break
Hi @ignasiduelo, thanks for the PR! I think this feature sounds reasonable, but I'm not sure it adds much over what you can already do, which is have each command in its own record. Each card can have multiple records. What lead you to do this instead of using multiple records? |
Ah you're totally right. |
I think making cards compatible between different implementations is
compelling. I’d rather you not have to reprogram your cards. I don’t really
see a downside to parsing each line as a command.
I’ll take a look when I’m back on my computer.
…On Fri, Nov 8, 2024 at 5:12 PM Ignasi Duelo ***@***.***> wrote:
Closed #18 <#18>.
—
Reply to this email directly, view it on GitHub
<#18 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJSBSSF2W6D3NFH6JFKY4DZ7TWGHAVCNFSM6AAAAABRNRLFV6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVGIZDANRWGU2TKNA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
What is the other tool that works this way? I wonder if there are other
commands or differences we want to consider.
…On Fri, Nov 8, 2024 at 6:53 PM Ryan Olf ***@***.***> wrote:
I think making cards compatible between different implementations is
compelling. I’d rather you not have to reprogram your cards. I don’t really
see a downside to parsing each line as a command.
I’ll take a look when I’m back on my computer.
On Fri, Nov 8, 2024 at 5:12 PM Ignasi Duelo ***@***.***>
wrote:
> Closed #18 <#18>.
>
> —
> Reply to this email directly, view it on GitHub
> <#18 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJSBSSF2W6D3NFH6JFKY4DZ7TWGHAVCNFSM6AAAAABRNRLFV6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVGIZDANRWGU2TKNA>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can fix the one redundant call, this seems fine to merge.
|
||
for (const command of lines) { | ||
await process_sonos_command(command); | ||
} | ||
|
||
await process_sonos_command(received_text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this call is redundant (in the case of a single line) and an error (in the event of multiple lines.
This adds support to store multiple commands in NFC card in text feld separated by line breaks, allowing things like storing a room change in a card and then playing an album from a particular track, such as: