Skip to content

Commit b140cda

Browse files
committed
return nothing if sonos is idle
1 parent a8a8e3b commit b140cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/apis/home_assistant_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def now_playing
2424
entity = data.find { _1[:entity_id] == @config["home_assistant"]["media_player_entity_id"] }
2525

2626
return {} unless entity.present?
27-
return {} if entity[:state] == "paused"
27+
return {} if entity[:state] == "paused" || entity[:state] == "idle"
2828

2929
if entity.dig(:attributes, :media_artist)&.include?("CPR News")
3030
{

0 commit comments

Comments
 (0)