Conditional Cards

Hello,

I use HomeAssistant to track some devices with bluetooth. So i always know who is at home and who not. But I have a problem. I want to show a picture in the overview between 08:00-11:30 and 13:00-16:00 only when no one is at home (all devices are unavailable). But when someone is at home then this picture has to be replaced from another picture.

Does someone know how can i do it?

Many thanks in advance

Ardian

Have a look at the state switch card:

I tried it, but it doesn’t work. No error is reported and the card remains empty, no picture is shown.

The name of sensor and the image path are correct…

type: custom:state-switch
entity: sensor.iphone_one_room_presence
states:
  Home:
    cards:
      - type: picture
        image: /local/img1.png
        tap_action:
          action: none
        hold_action:
          action: none
  not_home:
    cards:
      - type: picture
        image: /local/img2.png
        tap_action:
          action: none
        hold_action:
          action: none
  unavailable:
    cards:
      - type: picture
        image: /local/img3.png
        tap_action:
          action: none
        hold_action:
          action: none
  available:
    cards:
      - type: picture
        image: /local/img5.png
        tap_action:
          action: none
        hold_action:
          action: none

Sure, that Home is correct?

Yes, because I use it in another card and it works…

Interesting. I only was aware of state home