The following are application notes based on feedback from other users.
The integration uses local polling
with the Zidoo REST API to access data. As of version 2.0.0, Rapid Update is built-in with polling times of 1 second when the player is on, and 5 seconds when the player is off or not available.
If you want alternative polling times, the recommended method is to create automatons to activate the `homeassistant.update_entity' service.
For example:
alias: Zidoo Rapid Update
description: ''
trigger:
- platform: time_pattern
seconds: '*'
condition:
- condition: state
entity_id: media_player.zidoo
state: playing
action:
- service: homeassistant.update_entity
data: {}
target:
entity_id: media_player.zidoo
mode: single
NOTE: You can disable the default polling from within the Integration settings.
In addition to the native media player attributes, support for extra attributes is available in the main
beta release when the zidoo video or audio player is playing.
The list as of 4/23 includes
- "media_uri" - the file reference,
- "media_height" - the source video height
- "media_width" - the source video height
- "media_zoom" - the current player zoom mode,
- "media_tag" - the movie tag-line from the HT db
- "media_date" - the movie release date from th HT db
- "media_bitrate" - the video reported bitrate
- "media_fps" - the video reported frames per second
- "media_audio" - the source audio format
- "media_video" - the source video format
An example of using a template sensor to return the aspect-ratio
template:
- sensor:
- unique_id: zidoo_aspect_ratio
name: Zidoo Aspect Ratio
state: >
{% set width = state_attr('media_player.zidoo', 'media_width')|float(0) %}
{% set height = state_attr('media_player.zidoo', 'media_height')|float(1) %}
{% set ratio = (width / height)|round(2) %}
{% if ratio >= 2.35 %}
2.35:1
{% elif ratio >= 1.9 %}
1.90:1
{% elif ratio >= 1.77 %}
16:9
{% else -%}
4:3
{% endif %}
'''
You can customize the state to achieve the desired result based on your requirements. NOTE: 'media_zoom' may also be needed