mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-15 17:12:59 +00:00
FIx sonos_recoverable when content_id is None
This commit is contained in:
@@ -19,8 +19,11 @@ binary_sensor:
|
||||
friendly_name: Sonos recoverable
|
||||
entity_id: media_player.master_bedroom
|
||||
value_template: >-
|
||||
{% if state_attr('media_player.master_bedroom', 'media_content_id').startswith('x-sonos-spotify:spotify')
|
||||
or state_attr('media_player.master_bedroom', 'media_content_id').startswith('x-sonosapi-hls-static') %}
|
||||
|
||||
{% set content_id = state_attr('media_player.master_bedroom', 'media_content_id') %}
|
||||
{% if content_id == None
|
||||
or content_id.startswith('x-sonos-spotify:spotify')
|
||||
or content_id.startswith('x-sonosapi-hls-static') %}
|
||||
True
|
||||
{% else %}
|
||||
False
|
||||
|
||||
Reference in New Issue
Block a user