akasma74 / Hass-Custom-Alarm

It is a fork of "Yet another take on a home assistant custom alarm" that will exist until its author is back to our Earth
80 stars 31 forks source link

No keypad on lovelace #37

Closed djtommye closed 4 years ago

djtommye commented 4 years ago

This was working before I changed over to this branch.

Your components (from Alarm/Settings/About):

Platform & Browser:

Describe the bug When armed, the Alarm link on the sidebar takes to a page which displays the keypad to disarm. However, if I use the Lovelace card, I just see a disarm button with no keypad.

To Reproduce Steps to reproduce the behavior:

  1. Add a lovelace card of type "alarm-panel"
  2. Arm the alarm
  3. View the panel - no keypad.
  4. Click on the Alarm link on the sidebar, you'll see a keypad

Expected behavior Keypad displayed in lovelace when system is armed.

Lovelace card is configured as follows:

code: 1234
entity: alarm_control_panel.house
show_keypad: true
states:
  - arm_home
  - arm_away
type: alarm-panel

alarm

akasma74 commented 4 years ago

@YoinkZed your issue is completely different, could you double check description of this issue?

djtommye commented 4 years ago

@akasma74 - any thoughts on why I'm not seeing a keypad when armed? This is on vk74 edition v 1.10.1

akasma74 commented 4 years ago

@akasma74 - any thoughts on why I'm not seeing a keypad when armed?

Sorry, cannot look into it until I'm back to my HA. Mine works as expected.

akasma74 commented 4 years ago

Apparently this issue is with an old version of the integration and you do not see it with the current version - are you ok if I close this issue?

djtommye commented 4 years ago

I do see it in the current version.

On Tue, Jul 30, 2019 at 10:47 AM akasma74 notifications@github.com wrote:

Apparently this issue is with an old version of the integration and you do not see it with the current version - are you ok if I close this issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akasma74/Hass-Custom-Alarm/issues/37?email_source=notifications&email_token=AF54CQLXZCVS6GLTC3SFLODQCBPANA5CNFSM4IG2KJOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ENJKI#issuecomment-516478121, or mute the thread https://github.com/notifications/unsubscribe-auth/AF54CQL3TAZQFD2SPLHYK6DQCBPANANCNFSM4IG2KJOA .

--

Tommy Evans

akasma74 commented 4 years ago

ok, I'll double check when I can

akasma74 commented 4 years ago

Well, I cannot reproduce the issue on 0.95.4 and I don't want to update my HA just yet. Looks like a false issue to me, but let's wait until September when I update HA and perform a final check.

WaaromZoMoeilijk commented 4 years ago

Same on 0.97.2 latest version via HACS as of today (will check version number later, rebooting systems right now).

Stock alarm panel and custom alarm panel

akasma74 commented 4 years ago

Ok, got it. You have no keypad in Lovelace because there is no code defined in your bwalarm.yaml, but you'll see the keypad once you add that code. And that's exactly why you can disarm the alarm from Lovelace by pressing Disarm button. On the other hand, the Alarm view approach does not allow empty codes hence the keypad you see and as a result you're unable to disarm from there.

As I mentioned, this integration was created before Lovelace and is still not fully compatible with its alarm card.

I understand that the current state of how we handle situation with codes might be not ideal and I'll think how to improve it.

djtommye commented 4 years ago

Adding the code field to bwalarm.yaml fixed my issues. Perhaps I don't understand fully, but here are a couple of observations...

  1. I didn't have that in there before updating to this fork, and did see the alarm panel when armed
  2. I have a list of users in the bwalarm.yaml, and all active users have their own code assigned (I'd think this would suffice - either a global code or users with codes)
  3. I'd think that having an extra code in the file would be a security issue, because the assumption on my part is that you would either have a master code, or each user would have a code.
  4. Perhaps a log entry "No master code defined" would be good to have, so the users would have some idea of why this is happening, but - more importantly - to free up your time from having to answer questions like mine. ;-)
akasma74 commented 4 years ago
  1. I didn't have that in there before updating to this fork, and did see the alarm panel when armed

you mean a Lovelace alarm card with a keypad?

  1. I have a list of users in the bwalarm.yaml, and all active users have their own code assigned (I'd think this would suffice - either a global code or users with codes)

well, that's obviously not at the moment. and that's exactly what I need to think about - currently the code that flags if the keypad is needed relies on the code attribute only and it might be not quite right sometimes.

  1. I'd think that having an extra code in the file would be a security issue, because the assumption on my part is that you would either have a master code, or each user would have a code.

I'd say it's no more of a security issue than having a password in your configuration.yaml or secret.yaml..

  1. Perhaps a log entry "No master code defined" would be good to have, so the users would have some idea of why this is happening, but - more importantly - to free up your time from having to answer questions like mine. ;-)

Well, the current state reflects that some changes are required. I need to figure out the general concept - what codes are required and what are optional, is it allowed to have an empty/no code or not? And it's all should be based on use cases, but I currently limited by my own.. ;) so feel free to add your thoughts to the bank of ideas.

When I have this idea, it's easy to implement it.

WaaromZoMoeilijk commented 4 years ago

So where and how do i implement the code in bwalarm.yaml?

akasma74 commented 4 years ago

So where and how do i implement the code in bwalarm.yaml?

just add

code: 1234
WaaromZoMoeilijk commented 4 years ago

Weird its already in there, still no keypad

akasma74 commented 4 years ago

please open a new issue here and provide all relevant information and config files