Fix unknown service: media_player.null

This commit is contained in:
Edward Firmo
2023-09-11 23:49:00 +02:00
parent e1a078fea5
commit 39a5fcf434

View File

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