Giter Site home page Giter Site logo

Comments (3)

palazzem avatar palazzem commented on June 3, 2024

cc @andr3a88

from ha-econnect-alarm.

palazzem avatar palazzem commented on June 3, 2024

Reopening the issue as the "Unavailable" state has been fixed in #150, but automations are still triggered when the reconnection happens. In that case, we have the following situation:

State -> Disarmed -> State

This blip happens after the reconnection when the integration, while keeping the previous state correctly, sends an incorrect update to Home Assistant, triggering automations when another update happens.

from ha-econnect-alarm.

palazzem avatar palazzem commented on June 3, 2024

The fact that the device goes in Disarmed state, is because when there is a reconnection the Cloud API provides an empty state regardless of what are the actual armed sectors. After the reconnection, this is an example of what the backend returns:

{
  "last_id":1,
  "sectors":{
    "0":{
      "id":1,
      "index":0,
      "element":1,
      "name":"S1",
      "activable":false,
      "status":false
    },
    "1":{
      "id":1,
      "index":1,
      "element":2,
      "name":"S2",
      "activable":false,
      "status":false
    },
    "2":{
      "id":1,
      "index":2,
      "element":3,
      "name":"S3",
      "activable":false,
      "status":false
    },
    "3":{
      "id":1,
      "index":3,
      "element":4,
      "name":"S4",
      "activable":false,
      "status":false
    }
  }
}

In this example, S4 should had status: true. At this point we can assume that when last_id == 1, the backend returns the actual empty state (connection reset).

from ha-econnect-alarm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.