WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

[FEATURE REQUEST] Add button like picture glance

Open PilaScat opened this issue 3 years ago • 22 comments

image Very useful for opening gates, switch lights or tts

PilaScat avatar Nov 29 '21 18:11 PilaScat

Try ;) image

andiukas avatar Dec 06 '21 10:12 andiukas

Thanks, but was better directly in webrtc ui

PilaScat avatar Dec 06 '21 14:12 PilaScat

You can check this in latest master version: https://github.com/AlexxIT/WebRTC/pull/169

AlexxIT avatar Dec 07 '21 12:12 AlexxIT

Thanks, it's already on the latest release?

PilaScat avatar Dec 07 '21 13:12 PilaScat

No. Only in master version

AlexxIT avatar Dec 07 '21 14:12 AlexxIT

Not works 021-12-08 07:50:45 ERROR (MainThread) [frontend.js.latest.202112060] https://xxxxxxxxxxxxxxxxxxxxxxxxxx:8123/webrtc/webrtc-camera.js?v2.0.2:332:22 Uncaught TypeError: Cannot read properties of undefined (reading 'callService')

andiukas avatar Dec 08 '21 05:12 andiukas

Not works 021-12-08 07:50:45 ERROR (MainThread) [frontend.js.latest.202112060] https://xxxxxxxxxxxxxxxxxxxxxxxxxx:8123/webrtc/webrtc-camera.js?v2.0.2:332:22 Uncaught TypeError: Cannot read properties of undefined (reading 'callService')

Settings and file content please. So what version of hass do you have?

dmamontov avatar Dec 13 '21 12:12 dmamontov

Not works 021-12-08 07:50:45 ERROR (MainThread) [frontend.js.latest.202112060] https://xxxxxxxxxxxxxxxxxxxxxxxxxx:8123/webrtc/webrtc-camera.js?v2.0.2:332:22 Uncaught TypeError: Cannot read properties of undefined (reading 'callService')

Settings and file content please. So what version of hass do you have?

Everything is fine, I didn't add a feature: ui: true

andiukas avatar Dec 13 '21 13:12 andiukas

image with buttons it shows entity state, is possible to have the same thing here? like with picture glance?

PilaScat avatar Dec 15 '21 11:12 PilaScat

through card-mod you can do

example:

type: custom:webrtc-camera
style: |
  .shortcuts > .shortcut-0 {
    color: {% if is_state('switch.xiaomi_dafang_record', 'on') %}
              #df4d1d
           {% else %}
              white
           {% endif %};
    animation: {% if is_state('switch.xiaomi_dafang_record', 'on') %}
                  1s ease 0s infinite normal none running pulse;
               {% else %}
                  none
               {% endif %};
  }
  .shortcuts > .shortcut-1 {
    color: {% if is_state('switch.dafang_night_mode_2', 'on') %}
              var(--paper-item-icon-active-color, #fdd835)
           {% else %}
              white
           {% endif %};
  }
entity: camera.dafang3
ui: true
shortcuts:
  - name: Запись
    icon: mdi:record-circle-outline
    service: switch.toggle
    service_data:
      entity_id: switch.xiaomi_dafang_record
  - name: Ночной режим
    icon: mdi:theme-light-dark
    service: switch.toggle
    service_data:
      entity_id: switch.dafang_night_mode_2
  - name: Перезагрузить
    icon: mdi:refresh-circle
    service: switch.toggle
    service_data:
      entity_id: switch.xiaomi_dafang_power

dmamontov avatar Dec 15 '21 11:12 dmamontov

Thanks

PilaScat avatar Dec 15 '21 11:12 PilaScat

Does the shortcuts also support entity states where icons change color for example the cameras motion?

mash2k3 avatar Dec 15 '21 23:12 mash2k3

Does the shortcuts also support entity states where icons change color for example the cameras motion?

o wrote above. you can use card_mode

dmamontov avatar Dec 16 '21 06:12 dmamontov

But with that I can't see other status, like images for plex or light color

PilaScat avatar Dec 16 '21 10:12 PilaScat

Thought it would be easier and cleaner if it was built in since the function already exists in HA instead of adding custom CSS

mash2k3 avatar Dec 16 '21 14:12 mash2k3

it will turn out a little differently and it will be necessary to re-saw all the js that is connected. but such a principle is possible.

dmamontov avatar Dec 16 '21 15:12 dmamontov

Hi, I'm trying to add my presets ONVIF, but how can chage position (bottom center) and text (white) and background (black) to my shortcuts? Thanks!

image

nkgiovannivl avatar Dec 29 '21 17:12 nkgiovannivl

Hi, I'm trying to add my presets ONVIF, but how can chage position (bottom center) and text (white) and background (black) to my shortcuts? Thanks!

first, you need the version from the wizard. secondly, the card-mod component is required.

dmamontov avatar Dec 29 '21 19:12 dmamontov

Hi, I'm trying to add my presets ONVIF, but how can chage position (bottom center) and text (white) and background (black) to my shortcuts? Thanks!

first, you need the version from the wizard. secondly, the card-mod component is required.

Thanks! I did not know about card mod!

image

nkgiovannivl avatar Dec 30 '21 01:12 nkgiovannivl

can you do somehow picture-elements, so you have an overlay of say a temperature sensor icon and value on the camera image?

fgonza2 avatar Jan 05 '22 05:01 fgonza2

Is there any way to put sensor icons overlayed on the webrtc-camera card eg change an icon (ideally the icon and colour) when there's motion detected?

I haven't been able to get things like this to work:

title: Drive Cam via WebRTC
type: custom:webrtc-camera
entity: camera.drive_camera
muted: true
ui: true
shortcuts:
  top: 25
  left: 5
  services:
    - name: Motion
      icon: >
        {% if is_state('binary_sensor.drive_camera_motion', 'Detected') return
        'mdi:motion-sensor'; else return 'mdi:motion-sensor-off'; %}

Liam-Whiteside avatar Apr 28 '22 19:04 Liam-Whiteside

@Liam-Whiteside I think you can solve it with template sensor

dmamontov avatar Apr 29 '22 06:04 dmamontov

style settings supported from integration v3

AlexxIT avatar Jan 02 '23 12:01 AlexxIT