From fcddf8865e5a8f8e4bbbbcf79b236f180609a365 Mon Sep 17 00:00:00 2001 From: Matthijs Date: Mon, 7 Mar 2022 17:59:02 +0100 Subject: [PATCH] Added support for HomeAssistant `input_button` I only recently started using HomeAssistant, not sure if `button` is incorrect (and can be removed) but for me at least when I create a 'helper'/button it is of type `input_button`. --- apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py b/apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py index aca64b8f..11165894 100644 --- a/apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py +++ b/apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py @@ -290,8 +290,8 @@ class NsPanelLovelanceUI: value = entity.state + " " + entity.attributes.unit_of_measurement return "entityUpd,{0},{1},{2},{3},{4},{5}".format(item_nr, "text", item, icon_id, name, value) - if item_type == "button": - return "entityUpd,{0},{1},{2},{3},{4},{5}".format(item_nr, item_type, item, 3, name, "PRESS") + if item_type == "button" or item_type == "input_button": + return "entityUpd,{0},{1},{2},{3},{4},{5}".format(item_nr, "button", item, 3, name, "PRESS") def generate_thermo_page(self, item): entity = self.api.get_entity(item)