[RELEASE] Home Assistant Device Bridge (HADB)

Try it again. I corrected a typo in the file.

1 Like

Fixed,

Ran repair vs update. Then, checked for updates

Repair was successful and no updates found.

1 Like

While on the topic of Thermostats, question about Ecobee:
The local HA implementation pulls in remote sensor attributes as individual components. The cloud app pulls them in as motion sensors with most of the attributes on one device. Was wondering if there was a way to create a virtual motion sensor that relied on attributes of all the individual sensors from HA?

Not asking for a new driver for HADB. Asking if you know a way to combine the below sensors into one virtual device? I broke the cloud connection as unnecessary since I have the local option now. But, I liked having all that info in one tile on my dashboards. (Note: I do not believe "Occupancy" was available on the ecobee tile either)

image

Sorry. HA expose them as separate entities. HADB cannot combine them into one device.

I was more asking if you knew whether HE can do that. (An app??) Thought about creating a virtual motion and then using RM to update the virtual to match on change of any of the attributes. But, that seems busy and not efficient. Was hoping you might know a more elegant and/or efficient solution.

Have you looked at Tile Builder?

2 Likes

+1 to using Tile Builder (and/or Remote Builder) - Here, I'm using HABD to pull Echo Gen 5 temps combined with numerous other temp sensors in my HE. some are averaged groups in a room etc.


The ease, flexibility, and pure joy I get from my tiles and dashboard (I use HD+) can't be overstated!
I use HABD temp sensor combined with 2 others in my office to create an average temp for that room. Then I use that Averaged sensor to make a virtual thermostat for my floor heater!
Here's my AT - Office (an average of 3 sensors, including the HA Echo Gen 5 temp sensor)

Here's the virtual Thermostat for the Office:

And here's the Tile in HD+:
image

2 Likes

Two days ago, I added a couple of Ecobee remote sensors to my system and was wondering same thing. The code for driver for the Virtual Omni device is available. You can delete all of the pieces that you don't need and then use Rule Machine to keep it updated from the 3 separate devices coming from HADB. That's what I did except using Node Red. However, I am not aware of a dashboard tile that shows motion, temperature, and presence.

If you want to try the Omni device, I can paste here.

I might. The Eocbee was using "motion" which does have motion, battery, and temperature on the same device. It also had an "Occupied" attribute which I believe was ignored.

Flippin tablet keyboard posted the comment before I was done. But, yes, I would like to see that device.

Occupancy is exposed for the Thermostat itself and for each Sensor:

image

It seems Occupancy is based on Motion but with much longer timeout.
I am not using Occupancy but Motion is a part of many Automations including Apartment Occupancy detection.

Yep, but the cloud version of the default tile for the overall sensor ignored one or the other of them. It presented as a regular motion sensor and I believe they ignored occupancy. I was just looking to recreate that same tile.

This is what I end up with in HE when there is a binary_sensor without a device_class set and imported from HADB:

Even though the state attribute in HA is changing from on/off, in HE there is no data received.

The Type (driver) assigned is: Generic Component Unknown Sensor

This is the yaml config in ESPHome device:

binary_sensor:
  - platform: template
    name: Active
    id: active 
    on_press:                       
       - script.execute: active_timeout

Please enable debug logging in the parent driver then flip the device on and off. Post or message me the relevant logs.

Device 'active' ON

dev: 31642025-01-14 06: 01: 29.391 PMdebugparse: domain: binary_sensor, device_class: null, entity: binary_sensor.staircase_lights_active, newVals: [on
], friendly: Staircase Lights Active
dev: 31642025-01-14 06: 01: 29.388 PMdebugparse(): description = {
    "id": 1,
    "type": "event",
    "event": {
        "variables": {
            "trigger": {
                "id": "0",
                "idx": "0",
                "alias": null,
                "platform": "state",
                "entity_id": "binary_sensor.staircase_lights_active",
                "from_state": {
                    "entity_id": "binary_sensor.staircase_lights_active",
                    "state": "off",
                    "attributes": {
                        "friendly_name": "Staircase Lights Active"
                    },
                    "last_changed": "2025-01-14T23:00:24.525078+00:00",
                    "last_reported": "2025-01-14T23:00:24.525078+00:00",
                    "last_updated": "2025-01-14T23:00:24.525078+00:00",
                    "context": {
                        "id": "01JHKGQXADA7DMVSACYNRFCS4D",
                        "parent_id": null,
                        "user_id": null
                    }
                },
                "to_state": {
                    "entity_id": "binary_sensor.staircase_lights_active",
                    "state": "on",
                    "attributes": {
                        "friendly_name": "Staircase Lights Active"
                    },
                    "last_changed": "2025-01-14T23:01:27.859840+00:00",
                    "last_reported": "2025-01-14T23:01:27.859840+00:00",
                    "last_updated": "2025-01-14T23:01:27.859840+00:00",
                    "context": {
                        "id": "01JHKGSV5KYPV03NFAH9DGNGRR",
                        "parent_id": null,
                        "user_id": null
                    }
                },
                "for": null,
                "attribute": null,
                "description": "state of binary_sensor.staircase_lights_active"
            }
        },
        "context": {
            "id": "01JHKGSV5KYPV03NFAH9DGNGRR",
            "parent_id": null,
            "user_id": null
        }
    }

Device 'active' OFF

dev: 31642025-01-14 06: 01: 42.859 PMdebugparse: domain: binary_sensor, device_class: null, entity: binary_sensor.staircase_lights_active, newVals: [off
], friendly: Staircase Lights Active
dev: 31642025-01-14 06: 01: 42.856 PMdebugparse(): description = {
    "id": 1,
    "type": "event",
    "event": {
        "variables": {
            "trigger": {
                "id": "0",
                "idx": "0",
                "alias": null,
                "platform": "state",
                "entity_id": "binary_sensor.staircase_lights_active",
                "from_state": {
                    "entity_id": "binary_sensor.staircase_lights_active",
                    "state": "on",
                    "attributes": {
                        "friendly_name": "Staircase Lights Active"
                    },
                    "last_changed": "2025-01-14T23:01:27.859840+00:00",
                    "last_reported": "2025-01-14T23:01:27.859840+00:00",
                    "last_updated": "2025-01-14T23:01:27.859840+00:00",
                    "context": {
                        "id": "01JHKGSV5KYPV03NFAH9DGNGRR",
                        "parent_id": null,
                        "user_id": null
                    }
                },
                "to_state": {
                    "entity_id": "binary_sensor.staircase_lights_active",
                    "state": "off",
                    "attributes": {
                        "friendly_name": "Staircase Lights Active"
                    },
                    "last_changed": "2025-01-14T23:01:41.396190+00:00",
                    "last_reported": "2025-01-14T23:01:41.396190+00:00",
                    "last_updated": "2025-01-14T23:01:41.396190+00:00",
                    "context": {
                        "id": "01JHKGT8CM68KD8Q4GH0Y6MGXT",
                        "parent_id": null,
                        "user_id": null
                    }
                },
                "for": null,
                "attribute": null,
                "description": "state of binary_sensor.staircase_lights_active"
            }
        },
        "context": {
            "id": "01JHKGT8CM68KD8Q4GH0Y6MGXT",
            "parent_id": null,
            "user_id": null
        }
    }
}

HA is reporting proper events in both cases.

Could you post a screenshot of the HE event list for that device?

ok, well this must be the ESP device I'm using to conduct this test.

The actual device uses a physical switch on a gpio pin to enable the binary_sensor. Since I have to go to the physical switch and toggle on/off which is far away. I decided to use another device that has a template binary_sensor.

When I looked at the output for that one, it is generating events. So, I suppose now I need to go back to the Actual device and do the same tests. urrg... so much for shortcuts.

Is this just for one sensor? I see there's a value string in the current state showing OFF in the screenshot you posted. Does it change to ON when your HA device is active?

You can trigger off that or create a simple rule that changes the state of a virtual device if that's what you need. For example, here's a Switchbot sensor that is connected to a D1 Mini and then imported from HA.

Ok.. I'm wrong.

This is what happens when you think you know about Hubitat/Webcore and it's device management, as well has having used other HE Apps which import ESPHome devices: ESPHome + Hubitat All that combined with only have 2 days experience in Home Assistant.

I was looking for the created device in HE to have a 'switch' state showing up in Webcore when I added the device. When I didn't see that I went to the device page and found the Type was set to "Generic Component Unknown Sensor" and concluded with those two items the device must not be imported correctly.

However, by going though these detailed steps, and especially with your affirmations that the device is functioning, I looked closer at the 'value' attribute in Webcore. When I used that as the condition, it all worked as expected.

Sorry for the bother, but if its of any consolation, I learned a lot more about Home Assistant going through this and especially how well your App works. I also discovered that you can import button devices into HE and they work as well, which was impossible with the other App.

1 Like

Thanks for your reply. That was the 'trigger' I needed to do a double take and notice I was mistaken.

1 Like

Is it possible to add a second bridge? I'm migrating over to a HA install on a Synology NAS and would like to move devices over to it while the current bridge remains running devices left over there that haven't been migrated yet The Package Manager won't allow it but can it be done manually via github?