[RELEASE] Home Assistant Device Bridge (HADB)

To support button I would need to see log from different buttons in order to implement a generic mapping in HADB. (One that do not rely on modifications made on HA side)... anyone willing?

I am very new to HA and HADB but am definitely happy to help with some hand holding on the HA side. I do support several HE Community apps and drivers so familiar with HE.

1 Like

What exactly should be done? Sure, I can try.
Should I enable log on HABD parent ant toggle few buttons on HA?

Thanks @vitaliy_kh and @ritchierich I'm working on something and let you know what to test

Here is a log from parent when I clicked couple time Thermostat Clear button on HA.
Is this enough or something else is needed?

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:17:01.830 PM[debug](http://192.168.20.90/logs#)parse: domain: climate, device_class: null, entity: climate.corridor_thermostat, newVals: [off], friendly: Corridor Thermostat

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:17:01.823 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"climate.corridor_thermostat","from_state":{"entity_id":"climate.corridor_thermostat","state":"off","attributes":{"hvac_modes":["off","heat","cool","heat_cool"],"min_temp":45,"max_temp":95,"min_humidity":20,"max_humidity":50,"fan_modes":["on","auto"],"current_temperature":78,"temperature":null,"target_temp_high":null,"target_temp_low":null,"current_humidity":74.0,"humidity":36.0,"fan_mode":"auto","hvac_action":"idle","friendly_name":"Corridor Thermostat","supported_features":399},"last_changed":"2024-03-26T16:40:15.530593+00:00","last_updated":"2024-03-26T20:16:47.600685+00:00","context":{"id":"01HSY6H0FGSSC3G5BXENXJ3H82","parent_id":null,"user_id":null}},"to_state":{"entity_id":"climate.corridor_thermostat","state":"off","attributes":{"hvac_modes":["off","heat","cool","heat_cool"],"min_temp":45,"max_temp":95,"min_humidity":20,"max_humidity":50,"fan_modes":["on","auto"],"current_temperature":78,"temperature":null,"target_temp_high":null,"target_temp_low":null,"current_humidity":73.0,"humidity":36.0,"fan_mode":"auto","hvac_action":"idle","friendly_name":"Corridor Thermostat","supported_features":399},"last_changed":"2024-03-26T16:40:15.530593+00:00","last_updated":"2024-03-26T20:16:59.627815+00:00","context":{"id":"01HSY6HC7BWXPRAAEHHFBRXMBW","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of climate.corridor_thermostat"}},"context":{"id":"01HSY6HC7BWXPRAAEHHFBRXMBW","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:17:01.762 PM[debug](http://192.168.20.90/logs#)parse: domain: sensor, device_class: humidity, entity: sensor.corridor_thermostat_current_humidity, newVals: [73.0], friendly: Corridor Thermostat Current Humidity

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:17:01.756 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"sensor.corridor_thermostat_current_humidity","from_state":{"entity_id":"sensor.corridor_thermostat_current_humidity","state":"74.0","attributes":{"state_class":"measurement","unit_of_measurement":"%","device_class":"humidity","friendly_name":"Corridor Thermostat Current Humidity"},"last_changed":"2024-03-26T20:16:47.599251+00:00","last_updated":"2024-03-26T20:16:47.599251+00:00","context":{"id":"01HSY6H0FF6BWJMEBC4Z0H4ACQ","parent_id":null,"user_id":null}},"to_state":{"entity_id":"sensor.corridor_thermostat_current_humidity","state":"73.0","attributes":{"state_class":"measurement","unit_of_measurement":"%","device_class":"humidity","friendly_name":"Corridor Thermostat Current Humidity"},"last_changed":"2024-03-26T20:16:59.627080+00:00","last_updated":"2024-03-26T20:16:59.627080+00:00","context":{"id":"01HSY6HC7BQKSH524BKK98MMSK","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of sensor.corridor_thermostat_current_humidity"}},"context":{"id":"01HSY6HC7BQKSH524BKK98MMSK","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:59.503 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":2,"type":"result","success":true,"result":{"context":{"id":"01HSY6H9Z11X68BD8M6D15R46G","parent_id":null,"user_id":"cbef3d0b4da14ffb828ba621b37bcd22"}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:59.457 PM[debug](http://192.168.20.90/logs#)parse: domain: input_number, device_class: null, entity: input_number.kitchen_co2_helper, newVals: [465.0], friendly: Kitchen CO2 Helper

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:59.451 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"input_number.kitchen_co2_helper","from_state":{"entity_id":"input_number.kitchen_co2_helper","state":"470.0","attributes":{"initial":null,"editable":true,"min":0.0,"max":2000.0,"step":1.0,"mode":"box","unit_of_measurement":"ppm","icon":"mdi:molecule-co2","friendly_name":"Kitchen CO2 Helper"},"last_changed":"2024-03-26T20:14:56.291324+00:00","last_updated":"2024-03-26T20:14:56.291324+00:00","context":{"id":"01HSY6DKS20332X0CRB2FDP5YH","parent_id":null,"user_id":"cbef3d0b4da14ffb828ba621b37bcd22"}},"to_state":{"entity_id":"input_number.kitchen_co2_helper","state":"465.0","attributes":{"initial":null,"editable":true,"min":0.0,"max":2000.0,"step":1.0,"mode":"box","unit_of_measurement":"ppm","icon":"mdi:molecule-co2","friendly_name":"Kitchen CO2 Helper"},"last_changed":"2024-03-26T20:16:57.315245+00:00","last_updated":"2024-03-26T20:16:57.315245+00:00","context":{"id":"01HSY6H9Z11X68BD8M6D15R46G","parent_id":null,"user_id":"cbef3d0b4da14ffb828ba621b37bcd22"}},"for":null,"attribute":null,"description":"state of input_number.kitchen_co2_helper"}},"context":{"id":"01HSY6H9Z11X68BD8M6D15R46G","parent_id":null,"user_id":"cbef3d0b4da14ffb828ba621b37bcd22"}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:59.427 PM[debug](http://192.168.20.90/logs#)messUpdStr = {"id":2,"type":"call_service","domain":"input_number","service":"set_value","service_data":{"entity_id":"input_number.kitchen_co2_helper","value":465.0}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:59.421 PM[info](http://192.168.20.90/logs#)received set number to 465 request from Kitchen CO2 Helper

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:58.757 PM[debug](http://192.168.20.90/logs#)parse: domain: sensor, device_class: temperature, entity: sensor.bd_ecobee_bed_stand_temperature, newVals: [78.4], friendly: Bd Ecobee Bed Stand Temperature

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:58.750 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"sensor.bd_ecobee_bed_stand_temperature","from_state":{"entity_id":"sensor.bd_ecobee_bed_stand_temperature","state":"78.3","attributes":{"state_class":"measurement","unit_of_measurement":"\u00b0F","device_class":"temperature","friendly_name":"Bd Ecobee Bed Stand Temperature"},"last_changed":"2024-03-26T19:49:26.529118+00:00","last_updated":"2024-03-26T19:49:26.529118+00:00","context":{"id":"01HSY4YXW1BRSYJ3T5TKHXJ4VR","parent_id":null,"user_id":null}},"to_state":{"entity_id":"sensor.bd_ecobee_bed_stand_temperature","state":"78.4","attributes":{"state_class":"measurement","unit_of_measurement":"\u00b0F","device_class":"temperature","friendly_name":"Bd Ecobee Bed Stand Temperature"},"last_changed":"2024-03-26T20:16:56.621130+00:00","last_updated":"2024-03-26T20:16:56.621130+00:00","context":{"id":"01HSY6H99DMN99EZSVNR0TJCGA","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of sensor.bd_ecobee_bed_stand_temperature"}},"context":{"id":"01HSY6H99DMN99EZSVNR0TJCGA","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:57.182 PM[debug](http://192.168.20.90/logs#)parse: domain: device_tracker, device_class: null, entity: device_tracker.galaxy_tab_s9_ultra, newVals: [home], friendly: VK Galaxy Tab S9 Ultra

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:57.175 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"device_tracker.galaxy_tab_s9_ultra","from_state":{"entity_id":"device_tracker.galaxy_tab_s9_ultra","state":"home","attributes":{"source_type":"router","ip":"192.168.20.181","mac":"a2:96:ba:5d:dc:50","host_name":"Galaxy-Tab-S9-Ultra","last_time_reachable":"2024-03-26T20:16:24+00:00","icon":"mdi:lan-connect","friendly_name":"VK Galaxy Tab S9 Ultra"},"last_changed":"2024-03-26T16:40:15.922034+00:00","last_updated":"2024-03-26T20:16:24.889377+00:00","context":{"id":"01HSY6GA9SCTJTNE30TT4KJCZY","parent_id":null,"user_id":null}},"to_state":{"entity_id":"device_tracker.galaxy_tab_s9_ultra","state":"home","attributes":{"source_type":"router","ip":"192.168.20.181","mac":"a2:96:ba:5d:dc:50","host_name":"Galaxy-Tab-S9-Ultra","last_time_reachable":"2024-03-26T20:16:54+00:00","icon":"mdi:lan-connect","friendly_name":"VK Galaxy Tab S9 Ultra"},"last_changed":"2024-03-26T16:40:15.922034+00:00","last_updated":"2024-03-26T20:16:54.892842+00:00","context":{"id":"01HSY6H7KCZC5Q76WY5WEB6HK1","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of device_tracker.galaxy_tab_s9_ultra"}},"context":{"id":"01HSY6H7KCZC5Q76WY5WEB6HK1","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:57.118 PM[debug](http://192.168.20.90/logs#)parse: domain: device_tracker, device_class: null, entity: device_tracker.vitaliy_s_s23_ultra, newVals: [home], friendly: VK Galaxy Phone

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:57.111 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"device_tracker.vitaliy_s_s23_ultra","from_state":{"entity_id":"device_tracker.vitaliy_s_s23_ultra","state":"home","attributes":{"source_type":"router","ip":"192.168.20.246","mac":"aa:1f:3e:ee:19:3a","host_name":"Vitaliy-s-S23-Ultra","last_time_reachable":"2024-03-26T20:16:24+00:00","icon":"mdi:lan-connect","friendly_name":"VK Galaxy Phone"},"last_changed":"2024-03-26T16:40:15.911757+00:00","last_updated":"2024-03-26T20:16:24.888667+00:00","context":{"id":"01HSY6GA9RKDQ0MZ1S68WR167A","parent_id":null,"user_id":null}},"to_state":{"entity_id":"device_tracker.vitaliy_s_s23_ultra","state":"home","attributes":{"source_type":"router","ip":"192.168.20.246","mac":"aa:1f:3e:ee:19:3a","host_name":"Vitaliy-s-S23-Ultra","last_time_reachable":"2024-03-26T20:16:54+00:00","icon":"mdi:lan-connect","friendly_name":"VK Galaxy Phone"},"last_changed":"2024-03-26T16:40:15.911757+00:00","last_updated":"2024-03-26T20:16:54.892141+00:00","context":{"id":"01HSY6H7KC23PXT5NPZ0P63QZB","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of device_tracker.vitaliy_s_s23_ultra"}},"context":{"id":"01HSY6H7KC23PXT5NPZ0P63QZB","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:57.099 PM[debug](http://192.168.20.90/logs#)parse: domain: device_tracker, device_class: null, entity: device_tracker.corridor_thermostat, newVals: [home], friendly: Corridor-Thermostat

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:57.092 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"device_tracker.corridor_thermostat","from_state":{"entity_id":"device_tracker.corridor_thermostat","state":"home","attributes":{"source_type":"router","ip":"192.168.20.225","mac":"44:61:32:9f:98:3d","host_name":"Corridor-Thermostat","last_time_reachable":"2024-03-26T20:16:24+00:00","icon":"mdi:lan-connect","friendly_name":"Corridor-Thermostat"},"last_changed":"2024-03-26T16:40:15.908944+00:00","last_updated":"2024-03-26T20:16:24.888312+00:00","context":{"id":"01HSY6GA9RDY63W3TK2AQM08CZ","parent_id":null,"user_id":null}},"to_state":{"entity_id":"device_tracker.corridor_thermostat","state":"home","attributes":{"source_type":"router","ip":"192.168.20.225","mac":"44:61:32:9f:98:3d","host_name":"Corridor-Thermostat","last_time_reachable":"2024-03-26T20:16:54+00:00","icon":"mdi:lan-connect","friendly_name":"Corridor-Thermostat"},"last_changed":"2024-03-26T16:40:15.908944+00:00","last_updated":"2024-03-26T20:16:54.891788+00:00","context":{"id":"01HSY6H7KBR4C713PC6R2851F5","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of device_tracker.corridor_thermostat"}},"context":{"id":"01HSY6H7KBR4C713PC6R2851F5","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:57.080 PM[debug](http://192.168.20.90/logs#)parse: domain: device_tracker, device_class: null, entity: device_tracker.yelena_s_tab_a7, newVals: [home], friendly: Yelena-s-Tab-A7

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:57.073 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"device_tracker.yelena_s_tab_a7","from_state":{"entity_id":"device_tracker.yelena_s_tab_a7","state":"home","attributes":{"source_type":"router","ip":"192.168.20.222","mac":"0e:89:43:36:2c:4b","host_name":"Yelena-s-Tab-A7","last_time_reachable":"2024-03-26T20:16:24+00:00","icon":"mdi:lan-connect","friendly_name":"Yelena-s-Tab-A7"},"last_changed":"2024-03-26T16:40:15.908034+00:00","last_updated":"2024-03-26T20:16:24.888139+00:00","context":{"id":"01HSY6GA9RW3X89QAMK7HNZHTZ","parent_id":null,"user_id":null}},"to_state":{"entity_id":"device_tracker.yelena_s_tab_a7","state":"home","attributes":{"source_type":"router","ip":"192.168.20.222","mac":"0e:89:43:36:2c:4b","host_name":"Yelena-s-Tab-A7","last_time_reachable":"2024-03-26T20:16:54+00:00","icon":"mdi:lan-connect","friendly_name":"Yelena-s-Tab-A7"},"last_changed":"2024-03-26T16:40:15.908034+00:00","last_updated":"2024-03-26T20:16:54.891616+00:00","context":{"id":"01HSY6H7KBPS71ZN3RNMJ7KE5M","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of device_tracker.yelena_s_tab_a7"}},"context":{"id":"01HSY6H7KBPS71ZN3RNMJ7KE5M","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:49.814 PM[debug](http://192.168.20.90/logs#)parse: domain: climate, device_class: null, entity: climate.corridor_thermostat, newVals: [off], friendly: Corridor Thermostat

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:49.807 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"climate.corridor_thermostat","from_state":{"entity_id":"climate.corridor_thermostat","state":"off","attributes":{"hvac_modes":["off","heat","cool","heat_cool"],"min_temp":45,"max_temp":95,"min_humidity":20,"max_humidity":50,"fan_modes":["on","auto"],"current_temperature":78,"temperature":null,"target_temp_high":null,"target_temp_low":null,"current_humidity":73.0,"humidity":36.0,"fan_mode":"auto","hvac_action":"idle","friendly_name":"Corridor Thermostat","supported_features":399},"last_changed":"2024-03-26T16:40:15.530593+00:00","last_updated":"2024-03-26T20:16:29.558728+00:00","context":{"id":"01HSY6GEVP2YARWN32WHRKXJTV","parent_id":null,"user_id":null}},"to_state":{"entity_id":"climate.corridor_thermostat","state":"off","attributes":{"hvac_modes":["off","heat","cool","heat_cool"],"min_temp":45,"max_temp":95,"min_humidity":20,"max_humidity":50,"fan_modes":["on","auto"],"current_temperature":78,"temperature":null,"target_temp_high":null,"target_temp_low":null,"current_humidity":74.0,"humidity":36.0,"fan_mode":"auto","hvac_action":"idle","friendly_name":"Corridor Thermostat","supported_features":399},"last_changed":"2024-03-26T16:40:15.530593+00:00","last_updated":"2024-03-26T20:16:47.600685+00:00","context":{"id":"01HSY6H0FGSSC3G5BXENXJ3H82","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of climate.corridor_thermostat"}},"context":{"id":"01HSY6H0FGSSC3G5BXENXJ3H82","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:49.738 PM[debug](http://192.168.20.90/logs#)parse: domain: sensor, device_class: humidity, entity: sensor.corridor_thermostat_current_humidity, newVals: [74.0], friendly: Corridor Thermostat Current Humidity

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:49.732 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"sensor.corridor_thermostat_current_humidity","from_state":{"entity_id":"sensor.corridor_thermostat_current_humidity","state":"73.0","attributes":{"state_class":"measurement","unit_of_measurement":"%","device_class":"humidity","friendly_name":"Corridor Thermostat Current Humidity"},"last_changed":"2024-03-26T20:16:29.557950+00:00","last_updated":"2024-03-26T20:16:29.557950+00:00","context":{"id":"01HSY6GEVNJYTA46BBW740A9AC","parent_id":null,"user_id":null}},"to_state":{"entity_id":"sensor.corridor_thermostat_current_humidity","state":"74.0","attributes":{"state_class":"measurement","unit_of_measurement":"%","device_class":"humidity","friendly_name":"Corridor Thermostat Current Humidity"},"last_changed":"2024-03-26T20:16:47.599251+00:00","last_updated":"2024-03-26T20:16:47.599251+00:00","context":{"id":"01HSY6H0FF6BWJMEBC4Z0H4ACQ","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of sensor.corridor_thermostat_current_humidity"}},"context":{"id":"01HSY6H0FF6BWJMEBC4Z0H4ACQ","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:49.096 PM[debug](http://192.168.20.90/logs#)parse: domain: sensor, device_class: null, entity: sensor.geiger_counter_geiger_counter, newVals: [22.00], friendly: Geiger Counter Geiger Counter

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:49.089 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"sensor.geiger_counter_geiger_counter","from_state":{"entity_id":"sensor.geiger_counter_geiger_counter","state":"20.00","attributes":{"state_class":"measurement","unit_of_measurement":"CPM","icon":"mdi:pulse","friendly_name":"Geiger Counter Geiger Counter"},"last_changed":"2024-03-26T20:15:46.885366+00:00","last_updated":"2024-03-26T20:15:46.885366+00:00","context":{"id":"01HSY6F5655JPC1712JVWGK75S","parent_id":null,"user_id":null}},"to_state":{"entity_id":"sensor.geiger_counter_geiger_counter","state":"22.00","attributes":{"state_class":"measurement","unit_of_measurement":"CPM","icon":"mdi:pulse","friendly_name":"Geiger Counter Geiger Counter"},"last_changed":"2024-03-26T20:16:46.956090+00:00","last_updated":"2024-03-26T20:16:46.956090+00:00","context":{"id":"01HSY6GZVCREJ8B2YSXMY8KK4Z","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of sensor.geiger_counter_geiger_counter"}},"context":{"id":"01HSY6GZVCREJ8B2YSXMY8KK4Z","parent_id":null,"user_id":null}}}

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:49.070 PM[debug](http://192.168.20.90/logs#)parse: domain: sensor, device_class: null, entity: sensor.geiger_counter_radiation_level, newVals: [0.14304], friendly: Geiger Counter Radiation Level

[dev:20](http://192.168.20.90/logs#)2024-03-26 04:16:49.064 PM[debug](http://192.168.20.90/logs#)parse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"sensor.geiger_counter_radiation_level","from_state":{"entity_id":"sensor.geiger_counter_radiation_level","state":"0.13004","attributes":{"unit_of_measurement":"\u00b5Sv/h","icon":"mdi:radioactive","friendly_name":"Geiger Counter Radiation Level"},"last_changed":"2024-03-26T20:15:46.881304+00:00","last_updated":"2024-03-26T20:15:46.881304+00:00","context":{"id":"01HSY6F561Z9V1XTKAG1HQ5B8E","parent_id":null,"user_id":null}},"to_state":{"entity_id":"sensor.geiger_counter_radiation_level","state":"0.14304","attributes":{"unit_of_measurement":"\u00b5Sv/h","icon":"mdi:radioactive","friendly_name":"Geiger Counter Radiation Level"},"last_changed":"2024-03-26T20:16:46.884658+00:00","last_updated":"2024-03-26T20:16:46.884658+00:00","context":{"id":"01HSY6GZS44NYTDECTD8C2R6R3","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of sensor.geiger_counter_radiation_level"}},"context":{"id":"01HSY6GZS44NYTDECTD8C2R6R3","parent_id":null,"user_id":null}}}

* [Documentation](http://docs2.hubitat.com/)
* [Community](https://community.hubitat.com/)
* [Videos](https://www.youtube.com/channel/UC_U6xPALM_7_VH1Cw0Nl4CQ)
* [FAQ](https://community.hubitat.com/t/frequently-asked-questions-faq)

@ymerj Just a thought, adding buttons would require a command on every component driver and I see you are leveraging tons of inbuilt ones. Maybe add a buttonPress command to the parent HomeAssistant Hub Parent driver that expects the child entity id and the button name and that will send it on behalf of the child component.

1 Like

OK, I am waiting for the instruction(s).

HADB will stick with the one entity = one child device structure. Since button entity only support "press" it means the child device will only have the PushableButton capability and a 1 button count.

3 Likes

Well in my case I don't have a child entity in HE for this "Clear Hold" button that exists in HA. I do see an entity for this button within HA entity list. So if you can grab those buttons and let us choose to create a child device for it on the HE side that would solve it. Or I was just testing some code on the parent driver that works:
image
command "pressButton", [[name:"Entity ID",type:"STRING", description:"Child Entity ID"],[name:"Button Name",type:"STRING", description:"Name of button"]]

def pressButton(entityID, buttonName)
{
    buttonName = entityID + "_" + buttonName.toLowerCase().replace(" ", "_")
    service = "press"
    ch = "button." + buttonName

    executeButtonCommand(ch, service)
}

def executeButtonCommand(ch, service)
{    
    entity = ch
    domain = entity?.tokenize(".")[0]
    
    messUpd = [id: state.id, type: "call_service", domain: domain, service: service, service_data : [entity_id: entity]]
    state.id = state.id + 1

    messUpdStr = JsonOutput.toJson(messUpd)
    if (logEnable) log.debug("messUpdStr = ${messUpdStr}")
    interfaces.webSocket.sendMessage(messUpdStr)    
}
2 Likes

Yep. I've got a similar button issue with the HA Litter Robot (cloud API) device. There is a button in the HA entity list that "presses" a cloud button in the API to reset the waste drawer cycle count for the Litter Robot 3. There is no physical button paired to HA or on the LR 3 device:

So, there is no way to generate an event on HA that could generate the HADB child device on HE. The button device would need to pre-exist on the HE side.

It's somewhat similar to the garage door button that does come over to HE for garage door openers (e.g., RatGDO), which can be "pushed" on the HE side to cause the garage door device on HA to open the garage door:

That would be fine, simply to have a "button" entity on the HE side that could trigger a helper automation on the HA side to "press" the HA button entity.

You can create an automation on HA that presses the button on HA when the Toggle Helper is activated from HE (which I'm assuming is what you have done) and if you really wanted it to be a button on the HE side, you could add an additional RM rule to do that (although not requried).

Alternatively, you can use the HE > HA integration and share an HE virtual button with HA. Then create an HA automation that activates the HA button when the HE virtual button is pressed.

1 Like

Understood, and that's how I do it now. But, to me, it seems that all of the pieces are almost there in HADB to do it without the HE > HA integration if only a HADB pushable button child device could be manually created on HE without having an event come over from HA. All of that seems to be there because of the Garage Door cover.xxx entity that brings over a pushable HADB button control when any of the Garage Door entities generate an event on the HA side.

2 Likes

I just use a helper boolean from HA that looks like a switch in HE. When the switch turns on, I have HA Turn it back off then press the Clear Hold Entities for both of my TSTATS.

Automation in HA

1 Like

Sorry for the late reply. You could leave all the complexity as custom actions that only the more advanced users would look to implement. Yes, people would have to know something about HA entities. Yes, it would be one-way stateless push. It seems like that capability might address some of the functionality that is trying to be addressed over the last day?

2 Likes

Seems more a nice to have, than a need in my personal opinion. Using Virtual buttons from HE and sending them to HA via the HE > HA integration is ideal for when you have more than a single button press per HA device such as @vitaliy_kh showed here. That way you don't need to have a bunch of devices on HE to control each of the possible button presses on a specific HA device.

Again, I understand all of that, and that's similar to what I have. It just seems to me that most of the pieces are in place to bring my HA entity "button.litter_robot_reset_drawer" (and your "button.Upstairs_Clear_Hold", or whatever) over to HE for pushing on HE without having to create any HA Automation. The existence proof is the child HADB code for the Garage Door Control (see above) or the HADB code for "Generic Component TimeStamp Sensor" (which already has a pushable button capability). Interestingly, the Generic Component TimeStamp Sensor is automatically generated for the Litter Robot by HADB, but is used for Litter Robot "last seen" and "sleep mode start time" and "sleep mode end time".

Oh, I agree, but that's not the use case I am describing, which is not a bunch of possible button presses on a specific HA device. I am talking about a single button on a single device, as is the case for a Garage Door Opener (or, here, a reset button for the Litter Robot).

I agree that it's definitely in the "nice to have" category, not a "need", because I already solved the problem with the HA virtual switch/button that HADB passes to HE, as described above by @tray_e above. But I know how to do that. Novice HA users might not, and a "give me an HE button for HA entity button.whatever" would be simpler for them, and would mean that they would not need to add anything on the HA side.

1 Like

Version 2.3:

  • Add button support
  • Add call service command (experimental)
5 Likes

Thank you very much for the quick turn around on adding buttons and even including the call service command! Really appreciate your time supporting this integration.

Thanks so much for the rapid update. Perhaps I don't quite understand how to use it.

I will only be using this from a Rule Machine rule on HE. I see that one possible way to do it is by causing a "call service" to the HADB parent device with the appropriate HA action to press the Litter Robot "button.litter_robot_waste_drawer_reset" entity on HA. Fine.

As for the button support, I see that an additional entity is found and now can be checked in the HADB app during discovery for the "reset waste drawer" button (cloud API) on HA:

But I don't see a HADB device created on HE for this button:

Am I missing something?

I did see a Pushable Button driver installed by Hubitat Package Manager during the update:

I just don't see how to get a HE device from that. If I do a manual install on HE of a virtual Pushable Button using that driver, I don't see how to connect it through HADB to the button entity on HA.

So, I believe I see how to hit the call service command on the HADB parent device, but I don't see how to get a HADB device on HE that is tied to the HA button entity so that it can be pushed on HE.