Input Select
input_select:
cam_changer:
name: Funny GIFs
options:
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
initial: Option 1
icon: mdi:image
Camera
camera:
- platform: generic
name: Tacos!
still_image_url: "{% if is_state('input_select.cam_changer', 'Option 1') %}
https://media1.giphy.com/media/DgLsbUL7SG3kI/giphy.gif
{% elif is_state('input_select.cam_changer', 'Option 2') %}
https://media1.giphy.com/media/zTfwFhYUrIrnO/giphy.gif
{% elif is_state('input_select.cam_changer', 'Option 3') %}
https://media3.giphy.com/media/3o6Zt1bnn4IFOgnGxi/giphy.gif
{% elif is_state('input_select.cam_changer', 'Option 4') %}
https://media2.giphy.com/media/GU4dMaayEX2Bq/giphy.gif
{% elif is_state('input_select.cam_changer', 'Option 5') %}
https://media0.giphy.com/media/fItgT774J3nWw/giphy.gif
{% else %}
Image Error
{% endif %}"
limit_refetch_to_url_change: true
Automation
automation:
- id: bh
alias: Random Gif
trigger:
platform: time
minutes: '/1'
seconds: 00
action:
- service: input_select.select_next
data:
entity_id: input_select.cam_changer
# option: "{{ (['Option 1','Option 2','Option 3','Option 4','Option 5']|random) }}" # I tried to get random working with the input_select.select_option service but couldn't. Let me know if you have any ideas...
Group
group:
tacos:
name: Tacos
entities:
- automation.random_gif
- input_select.cam_changer
- camera.tacos
Result
Changes GIF every minute. Turn off automation for a static GIF and then select the GIF of your choice from the input select