All Projects → PiotrMachowski → Home-Assistant-Lovelace-Local-Conditional-card

PiotrMachowski / Home-Assistant-Lovelace-Local-Conditional-card

Licence: MIT License
This card can show and hide a specific card on current device while not affecting other windows. It does not require any integration to run.

Projects that are alternatives of or similar to Home-Assistant-Lovelace-Local-Conditional-card

numberbox-card
Replace input_number sliders with plus and minus buttons
Stars: ✭ 61 (+103.33%)
Mutual labels:  home-assistant, lovelace-card
Home-Assistant-Lovelace-HTML-Jinja2-Template-card
This card displays provided Jinja2 template as an HTML content of a card. It uses exactly the same engine as Home Assistant in Developer tools.
Stars: ✭ 27 (-10%)
Mutual labels:  home-assistant, lovelace-card
button-text-card
Custom, "neumorphism" Lovelace card
Stars: ✭ 95 (+216.67%)
Mutual labels:  home-assistant, lovelace-card
compass-card
A Lovelace card that shows a directional indicator on a compass for Home Assistant
Stars: ✭ 64 (+113.33%)
Mutual labels:  home-assistant, lovelace-card
ioBroker.lovelace
Visualization with Lovelace-UI
Stars: ✭ 41 (+36.67%)
Mutual labels:  home-assistant, lovelace-card
addon-matrix
Matrix - Home Assistant Community Add-ons
Stars: ✭ 39 (+30%)
Mutual labels:  home-assistant
home-assistant-sse
Using server-sent events with Home Assistant.
Stars: ✭ 16 (-46.67%)
Mutual labels:  home-assistant
soma-ctrl
Node util for controlling SOMA smart shade via MQTT or HTTP
Stars: ✭ 19 (-36.67%)
Mutual labels:  home-assistant
awesome-ha-blueprints
A curated collection of automation blueprints for Home Assistant.
Stars: ✭ 258 (+760%)
Mutual labels:  home-assistant
VisonicAlarm-for-Hassio
Visonic/Bentel/Tyco Alarm System integrtation for Home Assistant
Stars: ✭ 14 (-53.33%)
Mutual labels:  home-assistant
M5Stack-Air-Quality-ESPHome
ESPHome configuration for M5Stack's PM2.5 Air Quality Kit with the PMSA003 particulate matter sensor and the SHT20 temperature and humidity sensor
Stars: ✭ 19 (-36.67%)
Mutual labels:  home-assistant
addon-traccar
Traccar - Home Assistant Community Add-ons
Stars: ✭ 65 (+116.67%)
Mutual labels:  home-assistant
nibeuplink
Nibe Uplink asyncronous python interface
Stars: ✭ 20 (-33.33%)
Mutual labels:  home-assistant
amshan-homeassistant
Home Assistant integrasjon for strømmålere (AMS/HAN/P1). Integrasjonen støter både streaming (serieport/TCP-IP) og MQTT (Tibber Pulse, energyintelligence.se etc)
Stars: ✭ 39 (+30%)
Mutual labels:  home-assistant
WebRTC
Home Assistant custom component for viewing IP cameras RTSP stream in real time using WebRTC and MSE technology
Stars: ✭ 538 (+1693.33%)
Mutual labels:  home-assistant
Tuya-v2-Supported-Devices
A collection of all of the known working Tuya v2 Devices
Stars: ✭ 30 (+0%)
Mutual labels:  home-assistant
hassio-addons
DSMR Reader Datalogger and Metabase Home Assistant Add-ons
Stars: ✭ 29 (-3.33%)
Mutual labels:  home-assistant
HA-Build
Home-Assisant in Docker with support service containers
Stars: ✭ 16 (-46.67%)
Mutual labels:  home-assistant
addon-example
Example - Home Assistant Community Add-ons
Stars: ✭ 73 (+143.33%)
Mutual labels:  home-assistant
air-visual-card
A Lovelace card showing air quality data from airvisual.com. Requires the AirVisual component.
Stars: ✭ 70 (+133.33%)
Mutual labels:  home-assistant

Lovelace Local Conditional card

hacs_badge Community Forum buymeacoffee_badge paypalme_badge

This card can show and hide a specific card on current device while not affecting other windows. It does not require any integration to run.

Configuration options

Key Type Required Default Description
id string true - Identifier of a card, used in service calls. Must be unique!
card card true - Configuration of a nested card
default string false hide Default card behaviour. Possible values: [show, hide].

Services

This card adds 4 new services that can be used ONLY from UI:

  • local_conditional_card.show - shows specified cards
  • local_conditional_card.hide - hides specified cards
  • local_conditional_card.toggle - changes visibility of specified cards
  • local_conditional_card.set - sets visibility of specified cards

Each of these services requires a parameter ids that should contain a list:

service: local_conditional_card.show:
service_data:
  ids:
    - id_1
    - id_2
service: local_conditional_card.hide:
service_data:
  ids:
    - id_1
    - id_2
service: local_conditional_card.toggle:
service_data:
  ids:
    - id_1
    - id_2
service: local_conditional_card.set:
service_data:
  ids:
    - id_1: true
    - id_2: false

Example configuration

Example

views:
- name: Example
  cards:
  - type: 'custom:local-conditional-card'
    default: show
    id: sun1
    card:
      entities:
        - sun.sun
      title: Sun 1
      type: entities
  - type: 'custom:local-conditional-card'
    id: sun2
    card:
      entities:
        - sun.sun
      title: Sun 2
      type: entities
  - title: Click test
    type: entities
    entities:
      - action_name: Toggle
        icon: 'mdi:power'
        name: Sun1
        service: local_conditional_card.toggle
        service_data:
          ids:
            - sun1
        type: call-service
      - action_name: Show
        icon: 'mdi:power'
        name: Sun1
        service: local_conditional_card.show
        service_data:
          ids:
            - sun1
        type: call-service
      - action_name: Hide
        icon: 'mdi:power'
        name: Sun1
        service: local_conditional_card.hide
        service_data:
          ids:
            - sun1
        type: call-service
      - action_name: Hide All
        icon: 'mdi:power'
        name: Suns
        service: local_conditional_card.hide
        service_data:
          ids:
            - sun1
            - sun2
        type: call-service
      - action_name: Toggle
        icon: 'mdi:power'
        name: Sun2
        service: local_conditional_card.toggle
        service_data:
          ids:
            - sun2
        type: call-service
      - action_name: Show
        icon: 'mdi:power'
        name: Sun2
        service: local_conditional_card.show
        service_data:
          ids:
            - sun2
        type: call-service
      - action_name: Hide
        icon: 'mdi:power'
        name: Sun2
        service: local_conditional_card.hide
        service_data:
          ids:
            - sun2
        type: call-service

Manual Installation

  1. Download local-conditional-card.js to /www/custom_lovelace/local_conditional_card directory:
    mkdir -p www/custom_lovelace/local_conditional_card
    cd www/custom_lovelace/local_conditional_card/
    wget https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Local-Conditional-card/raw/master/dist/local-conditional-card.js
  2. Add card to resources in ui-lovelace.yaml or in raw editor if you are using frontend UI editor:
    resources:
      - url: /local/custom_lovelace/local_conditional_card/local-conditional-card.js
        type: module

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].