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

Duplicated commands detected in 1402.json #170

Open
paoloantinori opened this issue Dec 28, 2024 · 3 comments
Open

Duplicated commands detected in 1402.json #170

paoloantinori opened this issue Dec 28, 2024 · 3 comments
Assignees
Labels
PR required wontfix This will not be worked on

Comments

@paoloantinori
Copy link

Home Assistant version
2024.12.5

SmartIR version
1.19.0

SmartIR configuration

climate:
  - platform: smartir
    name: Sala AC
    unique_id: ac_sala
    device_code: 1402
    controller_data:
      controller_type: Broadlink
      remote_entity: remote.broadlink_remote
      delay_secs: 0.5
      num_repeats: 3

Describe the bug
Just a note in the logs that says the following

2024-12-28 17:41:22.744 INFO (MainThread) [custom_components.smartir] Invalid climate device JSON file '1402.json': duplicated commands detected.

Expected behavior
No log entries. And I wonder if that should be a Warning level anyway

To Reproduce
Steps to reproduce the behavior:

  1. start HA, it's logged at boot

Debug log
see attached

home-assistant_smartir_2024-12-28T16-50-53.852Z.log

@litinoveweedle
Copy link
Owner

Hello,

Climate JSON files should not contain the same commands. Please refer to the documentation what are the options. You can get rid of the warning if you modify the JSON file accordingly and I will accept PR of the modifications. This is exactly the reason for the warning - get the user attention and hope any similar file will be fixed. So this is not a bug, but a feature. :-)

@paoloantinori
Copy link
Author

paoloantinori commented Dec 30, 2024

I can try helping but I don't get what are the specs of these JSON files.
For what I can see in https://github.com/litinoveweedle/SmartIR/blob/master/codes/climate/1402.json
there is this structure:

  "commands": {
    "off": "JgAkAQABK...",
    "heat": {
      "low": {
        "swing": {
          "16": "JgAmAQA...",

which of those keys are considered commands? I would expect the keys under the commands entry.
And if that is the keys, there are no repetitions in the file, the only repetition I see in the files is down to those keys that are just numbers.

image

@litinoveweedle litinoveweedle added wontfix This will not be worked on and removed potential bug labels Dec 30, 2024
@litinoveweedle
Copy link
Owner

Hello, the documentation for the climate JSON files is here

The issue is not duplicate keys, but values as those are IR commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR required wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants