Perfect, works like a charm.
Again, thank you for all your effort in developing and improving HADB.
DG
Perfect, works like a charm.
Again, thank you for all your effort in developing and improving HADB.
DG
No new version number for this last minute fix. Ones must do a match-up or something in HPM if necessary.
A Repair followed by an Update.
This might be a big ask, but has there been any consideration for a way to bringing mower devices from HA to HE? I have two Navimows in Home Assistant so I'm looking at my options for controlling them from Hubitat.
It looks feasable. Are you willing to test?
I messaged you links for testing. Just in case. ![]()
Yes absolutely! I will see what I can do with it this weekend and let you know how it goes
So far, so good. Child devices were properly created for both my X315 and i215 mowers and all the commands appear to work from the device page
There seems to be an issue with the Lawn Mower Current State attribute displaying consistently. It periodically disappears from the Command tab leaving only “Health Status”. It seems to briefly reappear when I either send a new command (other than refresh or ping) or the Home Assistant integration possibly polls the Navimow API every few minutes.
I still need to try using the child devices in Rule Machine, so that’s next on my list. I assume I will need to send custom commands in the automations.
I also use the HD+ app on a handful of wall mounted Fire tablets, so I’ll see how they play together as well
There was a typo in the LawnMower attribute name. You can redownload the component driver. It should stick now.
Updated driver now properly reflects the LawnMower attribute.
Everything seems to be working as expected. Thanks for the help! This is a great addition and saved me from needing to go down the virtual switch route. Much appreciated
Version 2.29:
Hi im getting an error when trying to update in package manager to
2.29
Error Occurred During Installation
An error occurred while installing the package: Failed to upgrade driver https://raw.githubusercontent.com/ymerj/HE-HA-control/main/HA%20parent.groovy.
Be sure the package is not in use with devices.
Yes i did the same.
I received the same error. It appears to have updated the HADB app, but then failed on the parent device driver. Just mentioning to confirm the same error, but also pointing out it leaves the app upgraded, but not the drivers. I don't know if that will cause problems.
Error fixed...
That worked thank you.
Possible bug in HADB Parent Driver when importing Home Assistant button entities
Hi @ymerj
I think I found a small bug in the current HADB Parent Driver when handling Home Assistant button entities.
I added a native ESPHome button entity in Home Assistant and selected it for import through HADB.
The entity appeared correctly in the HADB discovery list, but no child device was created in Hubitat when I pressed the button.
The Hubitat log showed:
Parsing error: groovy.lang.MissingMethodException:
No signature of method: java.lang.Integer.replaceAll()
is applicable for argument types: (java.lang.String, java.lang.String)
values: [\_, ]
For button and input_button, the parent driver sets:
case "button":
case "input_button":
newVals = [1]
mapping = translateDevices(domain, newVals, friendly, origin)
break
So newVals[0] is an Integer.
However, inside translateDevices() the mapping also contains:
alarm_control_panel: [
type: "HADB Generic Component Panel",
event: [[
name: "securityKeypad",
value: newVals[0].replaceAll("_"," "),
descriptionText:"${friendly} is ${newVals[0]}"
]],
namespace: "community"
],
It appears Groovy evaluates this expression while building the mapping map, even when the current domain is button.
Therefore, when processing a button, it effectively tries to execute:
1.replaceAll("_"," ")
which causes the exception before the button child device can be created.
Changing:
value: newVals[0].replaceAll("_"," ")
to:
value: newVals[0].toString().replaceAll("_"," ")
should prevent the exception while preserving the existing behavior for alarm_control_panel, where the value is normally already a string such as armed_home.
The complete line would therefore become:
alarm_control_panel: [type: "HADB Generic Component Panel", event: [[name: "securityKeypad", value: newVals[0].toString().replaceAll("_"," "), descriptionText:"${friendly} is ${newVals[0]}"]], namespace: "community"],
The existing button handling itself appears correct, including:
def componentPush(ch, nb) {
if (logEnable) log.info("received push button ${nb} request from ${ch.label}")
executeCommand(ch, "press")
}
So this looks like a small type-safety issue in translateDevices() rather than a problem with the button implementation itself.
I tested the one-line change on my system and I can confirm the HA button child is then created correctly.
It means it evaluate them all.
Thanks for your detailed analysis and comprehensive solution. It is implemented right away.
Version 2.30: