gazoscalvertos / Hass-Custom-Alarm

Yet another take on a home assistant custom alarm
222 stars 96 forks source link

2 bugfixes #69

Closed akasma74 closed 4 years ago

akasma74 commented 5 years ago
  1. Fixed Uncaught TypeError: Cannot read property 'state' of undefined in closeSidebar
  2. Fixed typo (entityId instead of entity_id) that caused the following warning: Not passing an entity ID to a service to target all entities is deprecated. Update your call to alarm_control_panel.alarm_arm_home to be instead: entity_id: all
otherwish commented 5 years ago

Good catch! Thanks!!

djtommye commented 5 years ago

Sorry to sound dumb... That did fix the issue with bwalarm, but did not fix the entity_id issue. I just changed the one place in the alarm.html referenced by the github entry you pointed me to. Is that all I need to do? I cleared my browser cache and restarted HA. I'm still getting the warning:

2019-02-27 08:09:01 WARNING (MainThread) [homeassistant.helpers.service] Not passing an entity ID to a service to target all entities is deprecated. Update your call to alarm_control_panel.alarm_disarm to be instead: entity_id: all

(And I can still disarm with any code or none at all). Though I do have codes set in my config:

platform: bwalarm
name: House
panel:
  camera_update_interval: ''
  cameras: []
  enable_camera_panel: 'False'
  enable_clock: 'True'
  enable_clock_12hr: 'True'
  enable_custom_panel: 'False'
  enable_floorplan_panel: 'False'
  enable_sensors_panel: 'True'
  enable_serif_font: 'True'
  hide_passcode: 'True'
  shadow_effect: 'True'
  enable_fahrenheit: 'True'
  enable_weather: 'False'
  panel_title: Evans Residence

states:
  armed_away:
    immediate:
    - binary_sensor.bedrm_windows
    - binary_sensor.pergola_door
    - binary_sensor.back_door
    - binary_sensor.livingrm_motion
    delayed:
    - binary_sensor.front_door
    - binary_sensor.garage_door
    override: []
    pending_time: 60
    warning_time: 25
    trigger_time: 300
  armed_home:
    immediate: []
    delayed:
    - binary_sensor.back_door
    - binary_sensor.bedrm_windows
    - binary_sensor.front_door
    - binary_sensor.garage_door
    - binary_sensor.pergola_door
    override:
    - binary_sensor.livingrm_motion
    pending_time: 25
    warning_time: 25
    trigger_time: 60
  armed_perimeter:
    immediate: []
    delayed:
    - binary_sensor.back_door
    - binary_sensor.bedrm_windows
    - binary_sensor.front_door
    - binary_sensor.garage_door
    - binary_sensor.pergola_door
    override: []
    pending_time: 0
    warning_time: 25
    trigger_time: 300
users:
- id: 8509319f4eb14f6a8d6d6a5d358e34af
  name: Hass.io
  enabled: false
  code: 8509319f4eb14f6a8d6d6a5d358e34af
  picture: /local/images/ha.png
- id: 569963c7915047b0887a2892ddd73eac
  name: Thomas Evans
  enabled: true
  code: '0423'
  picture: /local/images/tommy.png
- id: a11068552ec7460f9295730d26809dff
  name: Cindy Evans
  enabled: true
  code: '0525'
  picture: /local/images/cindy.png
- id: 39eea06176c942f7a33c78005d655b15
  name: Tyler Evans
  enabled: true
  code: '0830'
  picture: /local/images/tyler.png
- id: 1ac18fb7d5ab4d66a64301d368899c8e
  name: Sarina Evans
  enabled: true
  code: '0823'
  picture: /local/images/sarina.png

- id: ad6690f53f8443aebc7c194ee2922bc7
  name: Fire Keypad
  enabled: false
  code: ad6690f53f8443aebc7c194ee2922bc7
  picture: /local/images/ha.png

admin_password: <REDACTED>
code_to_arm: 'False'
panic_code: '8101'
passcode_attempts: '5'
akasma74 commented 5 years ago

There are 2 places to correct in alarm.yaml, please double check Let's discuss the disarm issue in the appropriate place

adipose commented 5 years ago

Not passing an entity ID to a service to target all entities is deprecated. Update your call to alarm_control_panel.alarm_disarm to be instead: entity_id: all

I am getting this on the new UI. My alarm.html is version 1.3.6, vs the patched one referenced here being 1.3.4. I don't have any bad "entityID" entry, but I'm still getting this error.

Thoughts?

adipose commented 5 years ago

Never mind, had to reload the page again to get the error to go away. Here's a pr for the new UI fix (same basic fix for 1.3.6).

https://github.com/gazoscalvertos/Hass-Custom-Alarm/pull/78

akasma74 commented 5 years ago

@adipose thoughts - you need to clear cache on ALL your devices.