# Binary sensor Homey

**URL:** <https://community.homey.app/t/binary-sensor-homey/112896>\
**Category:** Developers\
**Created:** [July 14, 2024, 6:27pm UTC](https://community.homey.app/t/binary-sensor-homey/112896 "2024-07-14T18:27:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_Goral](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michal_goral/32/79675_2.png) [@Michal\_Goral](https://community.homey.app/u/Michal_Goral)\
**Post date:** [July 14, 2024, 6:27pm UTC](https://community.homey.app/t/binary-sensor-homey/112896/1 "2024-07-14T18:27:07Z")

</div>

I create a new type “Capabilities” bonary\_sensor.  
I would like to be able to add a flow to it which, after changing from true/false, can turn on or off another device.  
file: /.homeycompose/capabilities/binary\_sensor.json

```auto
{
  "type": "boolean",
  "title": { "en": "Binary Sensor" },
  "getable": true,
  "setable": false,
  "uiComponent": "sensor",
  "uiQuickAction": false,
  "icon": "/assets/input.svg"
}

```

file: driver.flow.compose.json

```auto
{
  "triggers": [
    {
      "id": "binary_sensor_true",
      "title": {
        "en": "Binary sensor is true"
      },
      "tokens": [
        {
          "name": "sensor_state",
          "type": "boolean",
          "title": {
            "en": "State"
          },
          "example": {
            "en": "true"
          }
        }
      ],
      "arguments": [
        {
          "name": "device",
          "type": "device",
          "filter": "capabilities=binary_sensor"
        }
      ]
    },
    {
      "id": "binary_sensor_false",
      "title": {
        "en": "Binary sensor is false"
      },
      "tokens": [
        {
          "name": "sensor_state",
          "type": "boolean",
          "title": {
            "en": "State"
          },
          "example": {
            "en": "false"
          }
        }
      ],
      "arguments": [
        {
          "name": "device",
          "type": "device",
          "filter": "capabilities=binary_sensor"
        }
      ]
    }
  ]
}

```

Not working.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 14, 2024, 6:46pm UTC](https://community.homey.app/t/binary-sensor-homey/112896/2 "2024-07-14T18:46:03Z")

</div>

> [@Michal\_Goral](#):
>
> Not working.

Not enough.  
Adding an error message might help to get a response 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Michal\_Goral](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michal_goral/32/79675_2.png) [@Michal\_Goral](https://community.homey.app/u/Michal_Goral)\
**Post date:** [July 14, 2024, 6:57pm UTC](https://community.homey.app/t/binary-sensor-homey/112896/3 "2024-07-14T18:57:37Z")

</div>

dont have response ,  
flow not run when i change i input state

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 14, 2024, 6:58pm UTC](https://community.homey.app/t/binary-sensor-homey/112896/4 "2024-07-14T18:58:59Z")

</div>

- Show the flow
- Share your app code

The amount of information you provide is not enough.
