From 39a5fcf434f94d7c14252c288a1b21af8ad3baef Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Mon, 11 Sep 2023 23:49:00 +0200 Subject: [PATCH] Fix unknown service: `media_player.null` --- nspanel_esphome.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index ea90ab6..1c2b602 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -1403,7 +1403,7 @@ text_sensor: { if (key == "volume_mute") id(ha_call_service)->execute("media_player.volume_mute", "is_volume_muted", value.c_str(), entity.c_str()); else if (key == "volume_set") id(ha_call_service)->execute("media_player.volume_set", "volume_level", to_string(stof(value) / 100), entity.c_str()); - else id(ha_call_service)->execute((std::string("media_player.") + key.c_str()), "", "", entity.c_str()); + else if (not key.empty()) id(ha_call_service)->execute((std::string("media_player.") + key.c_str()), "", "", entity.c_str()); } ESP_LOGV("text_sensor.localevent", "Finished");