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 compatible with HA 0.82.0 - invalid service data/breaks (newUI) #51

Open
brillb opened this issue Nov 11, 2018 · 5 comments
Open

Not compatible with HA 0.82.0 - invalid service data/breaks (newUI) #51

brillb opened this issue Nov 11, 2018 · 5 comments

Comments

@brillb
Copy link

brillb commented Nov 11, 2018

Describe the bug
Unable to use on HA 0.82.0, and likely other 0.80+ versions

To Reproduce
Steps to reproduce the behavior:
Install on 0.82.0

Expected behavior
Panel appears, activates/deactivates

Screenshots

2018-11-05 22:43:32 ERROR (MainThread) [homeassistant.core] Invalid service data for switch.turn_on: expected a dictionary. Got {‘automation.alarm_warning’}
2018-11-05 22:43:43 ERROR (MainThread) [homeassistant.core] Invalid service data for switch.turn_off: expected a dictionary. Got {‘automation.alarm_warning’}

fixed by changing to:

self._hass.services.call(“switch”, “turn_on”, {‘entity_id’:self._config.get(CONF_WARNING)})
self._hass.services.call(“switch”, “turn_on”, {‘entity_id’:self._config.get(CONF_ALARM)})

at all locations which were previously:

self._hass.services.call(“switch”, “turn_on”, {self._config.get(CONF_WARNING)})
self._hass.services.call(“switch”, “turn_on”, {self._config.get(CONF_ALARM)})

Fix in the attached Diff from bwalarm.py v1.1.2:
bwalarm-diff1.txt

also diff for alarms.html (missing two break statements)
alarmshtml-diff1.txt

@adipose
Copy link

adipose commented Nov 13, 2018

Do you have 1.04?

@adipose
Copy link

adipose commented Nov 13, 2018

In 1.04 those lines don't seem to exist. Instead, similar lines are present:

self._hass.services.call("switch", "turn_off", {self._alarm})

@brillb
Copy link
Author

brillb commented Nov 13, 2018

This is branch "newUI", much more recent than 1.04. I downloaded the code just 3 days ago, it's v1.1.2 as you can see currently here:
https://github.com/gazoscalvertos/Hass-Custom-Alarm/blob/newUI/custom_components/alarm_control_panel/bwalarm.py

@BenchPressesBooks
Copy link

I have noticed that MANY of the files uploaded have extraneous spaces and tabs, one of them had windows line endings instead of linux. After cleaning everything up and replacing all tabs and indents with two spaces it cleaned up A LOT of problems with the function in .82. I am still finding issues with CSS ordering and everything in mine causing some UI oddities on strange sized displays like the 7" Raspberry pi. I may try to put in a merge request eventually unless gazoscalvertos is going to commit updates soon. I noticed quite a few broken features and would love to clean up and contribute to the latest!

@adipose
Copy link

adipose commented Nov 13, 2018

@brillb ah, I see. I wasn't even aware of that branch.

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