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");