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

Alarm panel issue #8

Open
grego1981 opened this issue Nov 25, 2019 · 0 comments
Open

Alarm panel issue #8

grego1981 opened this issue Nov 25, 2019 · 0 comments

Comments

@grego1981
Copy link

grego1981 commented Nov 25, 2019

Hi,

I have configured some automations for some events on the sensors, if I get alarm states set by the developer tools, the automation works as it is supposed to and the state changes in the alarm control panel, if I set them from the alarm control panel the alarm activates by making a sound (which is not what I configured) and the alarm operates with the default settings of the Xiaomi gateway before the integration which not what I want. Is there a guide, some tips or something to configure the panel to set the correct settings in my gateway?
Below is the automation settings of one of the sensors:

  • id: 1000001-00000000004
    alias: Back Door
    trigger:
    • entity_id: binary_sensor.lumi_158d0002c472e7_door
      from: 'on'
      platform: state
      to: 'off'
      condition:
    • condition: state
      entity_id: alarm_control_panel.miio_gateway
      state: armed_away
    • condition: or
      conditions:
      • condition: state
        entity_id: alarm_control_panel.miio_gateway
        state: armed_home
    • condition: or
      conditions:
      • condition: state
        entity_id: alarm_control_panel.miio_gateway
        state: armed_night
        action:
    • data:
      message: Back Door Open
      service: telegram_bot.send_message
    • data:
      entity_id: media_player.miio_gateway
      service: media_player.media_play

and this is the configuration.yaml section for the gateway:

miio_gateway:
host: 10.10.10.99 # IP of your gateway
port: 54321 # port running miio_client, defaults to 54321
sensors: # sensors that will be available in HA (optional)
- sid: lumi.158d00027cce6a
class: motion # motion sensor
friendly_name: Back Room # display name (optional)
#restore: true
- sid: lumi.158d00027cceb2
class: motion # motion sensor
friendly_name: Fireplace # display name (optional)
#restore: true
- sid: lumi.158d0002c47299
class: door # door sensor
#restore: true # will restore sensor state after HA reboot
friendly_name: Main Door
- sid: lumi.158d0002c472e7
class: door # door sensor
#restore: true # will restore sensor state after HA reboot
friendly_name: Back Door
- sid: lumi.158d0002bfb134
class: button # button
restore: true

And this is the panel configuration in which the only states that work are the ones in the code below, if I change manually the states to eg. armed_away instead or arm_away I get the error of unknown state.

entity: alarm_control_panel.miio_gateway
states:

  • arm_home
  • arm_away
  • arm_night
    type: alarm-panel

I'm a complete newbiew and trying very much to learn the logic behind this but I fail to understand why the state is valid for the same entity when set from the developer tools and invalid when configured in this widget.....

Thank you!

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

1 participant