Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When camera unavailable json data will be displayed #1649

Open
2 tasks done
kevin07042002 opened this issue Oct 16, 2024 · 3 comments
Open
2 tasks done

When camera unavailable json data will be displayed #1649

kevin07042002 opened this issue Oct 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@kevin07042002
Copy link

Checklist:

[REQUIRED] Card diagnostic information:
Card diagnostics. Please review for confidential information prior to sharing

{
  "ha_version": "2024.10.1",
  "card_version": "5.2.0",
  "browser": "Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0",
  "date": "2024-10-16T15:09:08.544Z",
  "frigate_version": {
    "2695236f61dad4a7afd8c1885ce62792": "5.4.0/0.14.1-f4f3cfa"
  },
  "lang": "en",
  "timezone": "Europe/Berlin",
  "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",
    "cameras": [
      {
        "camera_entity": "camera.carport",
        "live_provider": "go2rtc",
        "go2rtc": {
          "modes": [
            "webrtc"
          ]
        }
      }
    ],
    "elements": [
      {
        "type": "conditional",
        "conditions": [
          {
            "condition": "state",
            "entity": "switch.gs308ep_1_poe_power",
            "icon": "mdi:toggle-switch",
            "state": "on"
          }
        ],
        "elements": [
          {
            "type": "custom:frigate-card-menu-state-icon",
            "entity": "switch.gs308ep_1_poe_power",
            "icon": "mdi:toggle-switch-off",
            "style": {
              "state": "on",
              "color": "rgb(0, 255, 0)"
            },
            "tap_action": {
              "action": "toggle"
            }
          }
        ]
      },
      {
        "type": "conditional",
        "conditions": [
          {
            "condition": "state",
            "entity": "switch.gs308ep_1_poe_power",
            "icon": "mdi:toggle-switch",
            "state": "off"
          }
        ],
        "elements": [
          {
            "type": "custom:frigate-card-menu-state-icon",
            "entity": "switch.gs308ep_1_poe_power",
            "icon": "mdi:toggle-switch",
            "style": {
              "state": "off",
              "color": "rgb(255, 0, 0)"
            },
            "tap_action": {
              "action": "toggle"
            }
          }
        ]
      }
    ],
    "live": {
      "show_image_during_load": true,
      "preload": false
    }
  }
}
´´´

<!--
On the card, hold down the Default/Frigate menu button for a few seconds then paste the diagnostics below. No help can be provided without this
-->

A snippet from the frontend config:

```yaml
square: true
columns: 2
type: grid
cards:
  - type: custom:frigate-card
    cameras:
      - camera_entity: camera.carport
        live_provider: go2rtc
        go2rtc:
          modes:
            - webrtc
    elements:
      - type: conditional
        conditions:
          - condition: state
            entity: switch.gs308ep_port_1_poe_power
            icon: mdi:toggle-switch
            state: "on"
        elements:
          - type: custom:frigate-card-menu-state-icon
            entity: switch.gs308ep_port_1_poe_power
            icon: mdi:toggle-switch-off
            style:
              state: "on"
              color: rgb(0, 255, 0)
            tap_action:
              action: toggle
      - type: conditional
        conditions:
          - condition: state
            entity: switch.gs308ep_1_poe_power
            icon: mdi:toggle-switch
            state: "off"
        elements:
          - type: custom:frigate-card-menu-state-icon
            entity: switch.gs308ep_1_poe_power
            icon: mdi:toggle-switch
            style:
              state: "off"
              color: rgb(255, 0, 0)
            tap_action:
              action: toggle
    live:
      show_image_during_load: true
      preload: false

[REQUIRED] Description of problem:
I integrated a button in the frontend to shutdown / reboot the cameras over a poe switch. When the camera is off the string is "camera is unavailable" is displayed on top of the view followed by json data.
Expected would be only a view of the string without the json output

[OPTIONAL] Last working release (if known):

[OPTIONAL] Javascript errors shown in the web inspector:


[OPTIONAL] Additional information:

@kevin07042002 kevin07042002 added the bug Something isn't working label Oct 16, 2024
@dermotduffy
Copy link
Owner

Firstly, recommend changing to the latest beta which changes some of how unavailable cameras are handled: https://github.com/dermotduffy/frigate-hass-card/releases/tag/v6.0.0-beta.8

integrated a button in the frontend to shutdown / reboot the cameras over a poe switch. When the camera is off the string is "camera is unavailable" is displayed on top of the view followed by json data.
Expected would be only a view of the string without the json output

Can you include a screenshot of what appears? You want the diagnostics message to not appear? The issue here is of course that it is hard for the card to tell the difference between:

  • A camera is unavailable and you expect that
  • A camera is unavailable and you don't expect that [and might want the message to appear...]

@tootai
Copy link

tootai commented Oct 21, 2024

Hi, same request here, I would that if cameras are disabled in frigate they don't appear in birdseye or just their name. At this time we see:
Capture d’écran du 2024-10-21 16-46-33

@dermotduffy
Copy link
Owner

@tootai The card cannot control what does or does not show up in birdseye, that is decided by the Frigate backend. I'd recommend you update to the latest beta (linked in my previous comment on this issue), as it changes how an unavailable camera behaves (does not block the whole card the way it does in v5.20).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants