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

’<’ not supported between instances of ‘str’ and 'int’ when editing settings #34

Open
skynet01 opened this issue Jul 24, 2019 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@skynet01
Copy link

Your components (from Alarm/Settings/About):

  • component version v1.10.1

Platform & Browser:

  • Platform name & Home assistant version [e.g. Hass.io 0.96.3]
  • Browser name Chrome / Firefox

Describe the bug
When going to settings of the panel I get the following errors

Failed to call service alarm_control_panel/alarm_yaml_user. list indices must be integers or slices, not str
when saving any setting in the settings I get this
’<’ not supported between instances of ‘str’ and 'int’

To Reproduce
Steps to reproduce the behavior:

  1. Go to settings pannel

Expected behavior
Saving settings

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Installed using HACS
copied resources folder to /config
inside: /config/resources/bwalarm/bwalarm.yaml

  • platform: bwalarm

in the main confing
alarm_control_panel: !include resources/bwalarm/bwalarm.yaml

@akasma74
Copy link
Owner

akasma74 commented Jul 24, 2019

Did you install the integration when on HA 0.96.3 or on previous version of HA that was updated later?
Just checking because I'm currently on 0.95.4 and so far have no intention to update as a) I'm away from my HA and b) I have no issues with saving any changes to bwalarm.yaml..

@skynet01
Copy link
Author

With HA 0.96.3, it's a fresh install

@dnguyen800
Copy link

Hi, I also get the same error message as @skynet01 , but I have a slightly different HA setup. I cannot save any settings through the Alarm UI either. I did initially try to setup bwalarm settings in the bwalarm.yaml, but then erased and tried to save settings in the UI.

This is a first-time install of bwalarm. I have tried uninstalling and re-installing through HACS again but the issue remains.

Your components (from Alarm/Settings/About):
component version v1.10.1

Platform & Browser:
Platform name & Home assistant version [e.g. Hass.io 0.95.4]
Browser name Chrome

Describe the bug
When pressing a button on the alarm (in the screenshot, I press the 'Away' button, I get this message:

Failed to call service alarm_control_panel/alarm_arm_away

when saving any setting in the settings I get this:

’<’ not supported between instances of ‘str’ and 'int’

To Reproduce
Steps to reproduce the behavior:

Click on any button in alarm panel, or change any setting.

Expected behavior
Saving settings

Screenshots
If applicable, add screenshots to help explain your problem.

image

image

Additional context
Installed using HACS
copied resources folder to /config
inside: /config/resources/bwalarm/bwalarm.yaml

platform: bwalarm
in the main config
alarm_control_panel: !include resources/bwalarm/bwalarm.yaml

@dnguyen800
Copy link

Update: I installed bwalarm on another HA instance and it worked. The only difference I can think of is in the bwalarm.yaml file. I previously had this entry (with the '-') in the yaml file:

- platform: bwalarm

Changing to this fixed the issue:

platform: bwalarm

Now that I see a working config, I can see why the dash was causing problems. The Alarm UI edits the bwalarm.yaml file and adds configuration entries. If you have another alarm besides bwalarm listed in the .yaml file, then you will run into the issue.

@akasma74
Copy link
Owner

akasma74 commented Jul 30, 2019

@dnguyen800 so in your case it's another platform in bwalarm.yaml that created the issue, right?

The only difference I can think of is in the bwalarm.yaml file. I previously had this entry (with the '-') in the yaml file

it's not the original bwalarm.yaml, is it? it won't work with dash as it's not a list.

@dnguyen800
Copy link

Correct, it was my fault as I wanted to include another MQTT alarm platform in bwalarm.yaml. By adding the '-', it messed up the YAML formatting when the UI alarm settings are changed.

@akasma74
Copy link
Owner

akasma74 commented Jul 30, 2019

@skynet01 could you post content of your bwalarm.yaml and HA log when you see that error here?

@akasma74 akasma74 added the question Further information is requested label Jul 30, 2019
@skynet01
Copy link
Author

skynet01 commented Aug 5, 2019

Yes, I can confirm that removing the "-" from the config fixes the issue. No more errors in the setting and everything seems to be working. Would be nice to have this fixed since I have other devices that have built-in alarm panels like Arlo that I can't use

@akasma74
Copy link
Owner

akasma74 commented Aug 6, 2019

@skynet01 do you know how to fix it?
as far as I understand, it's incorrect YAML syntax and there is nothing anyone can fix apart from correcting the yaml file itself - correct me if I'm wrong.

@skynet01
Copy link
Author

skynet01 commented Aug 9, 2019

Maybe the config for the app should be in a separate file since it’s managed by the ui anyway. That way we can just have our alarm.yaml file in the main config folder with just single line platform declaration.

@akasma74
Copy link
Owner

akasma74 commented Aug 9, 2019

Got it. Need to think about it as it's a bit complicated stuff

@akasma74 akasma74 added enhancement New feature or request and removed question Further information is requested labels Aug 18, 2019
@akasma74 akasma74 self-assigned this Aug 19, 2019
@skynet01
Copy link
Author

skynet01 commented Sep 2, 2019

Can't you just have the component load with "platform: bwalarm" in alarm.yaml file and then just keep all of the config parameters in a separate settings file? Or its not that simple

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

No branches or pull requests

3 participants