dermotduffy / frigate-hass-card

A Lovelace card for Frigate in Home Assistant
MIT License
532 stars 59 forks source link

Automation does not work with state condition #1491

Open luisiam opened 1 month ago

luisiam commented 1 month ago

Checklist:

Release with the issue: v5.2.0

Last working release (if known): N/A

Browser and Operating System: MacOS 14.6 Safari

Description of problem: I am trying to start auto streaming of the camera when it detect motion via automation. The live_substream_on and live_substream_off action works if I am using some frigate conditions, e.g. fullscreen: true, but it won't work with HA entity state.

Frigate card diagnostic information

{
  "ha_version": "2024.8.0",
  "card_version": "5.2.0",
  "browser": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15",
  "date": "2024-08-08T02:01:31.636Z",
  "frigate_version": {
    "ac7c79aead3cf64bbfa0246c9c628ade": "5.3.0/0.14.0-da913d8"
  },
  "lang": "en",
  "timezone": "America/Los_Angeles",
  "git": {
    "build_version": "5.2.0-HEAD+g69249b6",
    "build_date": "Fri, 23 Jun 2023 15:26:26 GMT",
    "commit_date": "Thu, 22 Jun 2023 09:21:26 -0600"
  },
  "config": {
    "type": "custom:frigate-card",
    "automations": [
      {
        "conditions": {
          "state": [
            {
              "entity": "binary_sensor.doorbell_person_occupancy",
              "state": "on"
            }
          ]
        },
        "actions": [
          {
            "action": "custom:frigate-card-action",
            "frigate_card_action": "live_substream_on"
          }
        ],
        "actions_not": [
          {
            "action": "custom:frigate-card-action",
            "frigate_card_action": "live_substream_off"
          }
        ]
      }
    ],
    "cameras": [
      {
        "camera_entity": "camera.doorbell",
        "live_provider": "image",
        "dependencies": {
          "all_cameras": true
        }
      },
      {
        "camera_entity": "camera.doorbell",
        "hide": true,
        "id": "doorbell_hd",
        "live_provider": "go2rtc"
      }
    ],
    "performance": {
      "profile": "low"
    },
    "menu": {
      "buttons": {
        "frigate": {
          "enabled": true
        }
      }
    }
  }
}

Javascript errors shown in the web inspector (if applicable):

N/A

Additional information: N/A

dermotduffy commented 6 days ago

Please update to the latest build and let me know if you still have this issue:

https://github.com/dermotduffy/frigate-hass-card/releases/tag/v6.0.0-beta.1

luisiam commented 6 days ago

I am trying to migrate my current config to the new format. Another issue is that override won't work at all if I am using low performance profile.