Code Monkey home page Code Monkey logo

Comments (4)

P-Storm avatar P-Storm commented on July 18, 2024

Looks like a weird thing happening in the /info/connectors part of the json.

Slaapkamer config

{
    "connectors":
    [
        {
            "id": 0,
            "type": 0
        },
        {
            "id": 1,
            "type": 2
        },
        {
            "id": 2,
            "type": 1
        },
        {
            "id": 3,
            "type": 1
        }
    ]
}

This is causing some troubles, currently setting this up that it won't mix and break things (and have a display 2 and 3). Will see when I can work on it, will be somewhere next week I think

from ha-button-plus.

nvdweem avatar nvdweem commented on July 18, 2024

Perhaps a silly question, but what makes this weird?

I have no knowledge about the structure, but seeing that I have 1 display and 2 bars I would expect this to mean that the backplate top slot is empty (or connected to the display middle connector which could be a dummy connector), the second slot has the display and the bottom 2 slots are bars.

from ha-button-plus.

P-Storm avatar P-Storm commented on July 18, 2024

Normally the iteration is going from bottom to top. Now in the code there are some assumptions happening about id / 2 = bar value for example. I did the same, and with my change of the luminescence I introduced a bug. The grouping part I still am searching for, but not enough time to research it yet.

from ha-button-plus.

nvdweem avatar nvdweem commented on July 18, 2024

From what I can tell, the configuration for my device behaves as I described:

Bar, Display
"connectors": [
	{ "id": 0, "type": 1 },
	{ "id": 1, "type": 0 },
	{ "id": 2, "type": 0 },
	{ "id": 3, "type": 2 } 
],

Bar, empty, emtpy, Bar
"connectors": [
	{ "id": 0, "type": 1 },
	{ "id": 1, "type": 0 },
	{ "id": 2, "type": 0 },
	{ "id": 3, "type": 1 }
],

Display (bottom connector in top slot), empty, emtpy, bar
"connectors": [
	{ "id": 0, "type": 2 },
	{ "id": 1, "type": 0 },
	{ "id": 2, "type": 0 },
	{ "id": 3, "type": 1 }
],

empty, empty, display (so display bottom connector does not connect)
"connectors": [],

The last one was to confirm that the only interesting connector for the display is the bottom one.

from ha-button-plus.

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.