Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

0.2.5: Update monster-card.js (#10)

Latest
Compare
Choose a tag to compare
@iantrich iantrich released this 22 Sep 02:46
· 1 commit to master since this release
* Update monster-card.js

A monstruously awesome way to execute services dynamic over each filtred entity.

Imagine a use case where we need an adaptive card for showing triggered alarmed sensors( like an open window) that prevent us to arm your alarm.
The monster-card can easily filter that sensors and call a service by configuring a tap-action but in that case we need to provide the choosen / clicked entity_id to the service call.

Here is a sample of what i mean:

```
- type: 'custom:monster-card'
card:
  type: glance
filter:
  include:
    - entity_id: binary_sensor.visonic*
      attributes:
        "state": "On"
      options:
        tap_action:
          action: call-service
          service: visonic.alarm_sensor_bypass
          service_data:
            bypass: 'True'
            entity_id: this.entity_id
```
This commit parse the options object to replace the "this.entity_id" string with the real filtered iterated object entity_id.

* Update README.md