Skip to content

Commit

Permalink
Merge pull request #296 from Drenso/add-infrared-remote
Browse files Browse the repository at this point in the history
Add infrared remote
  • Loading branch information
bobvandevijver authored Nov 6, 2024
2 parents bdae8bb + 4432386 commit 5096987
Show file tree
Hide file tree
Showing 36 changed files with 847 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .homeycompose/capabilities/mute_button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "boolean",
"title": {
"en": "Mute"
},
"getable": false,
"setable": true,
"uiComponent": "button",
"icon": "assets/capabilities/button_mute.svg"
}
10 changes: 10 additions & 0 deletions .homeycompose/capabilities/off_button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "boolean",
"title": {
"en": "Off"
},
"getable": false,
"setable": true,
"uiComponent": "button",
"icon": "assets/capabilities/button_off.svg"
}
10 changes: 10 additions & 0 deletions .homeycompose/capabilities/on_button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "boolean",
"title": {
"en": "On"
},
"getable": false,
"setable": true,
"uiComponent": "button",
"icon": "assets/capabilities/button_on.svg"
}
10 changes: 10 additions & 0 deletions .homeycompose/capabilities/power_button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "boolean",
"title": {
"en": "Power"
},
"getable": false,
"setable": true,
"uiComponent": "button",
"icon": "assets/capabilities/button_power.svg"
}
182 changes: 182 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2455,6 +2455,81 @@
}
]
},
{
"id": "infrared_remote_press",
"title": {
"en": "Press button"
},
"titleFormatted": {
"en": "Press [[button]]"
},
"args": [
{
"type": "device",
"name": "device",
"filter": "driver_id=infrared_remote"
},
{
"name": "button",
"type": "autocomplete",
"title": {
"en": "Button"
}
}
]
},
{
"id": "infrared_remote_mute_button",
"title": {
"en": "Press mute button"
},
"args": [
{
"type": "device",
"name": "device",
"filter": "driver_id=infrared_remote&capabilities=mute_button"
}
]
},
{
"id": "infrared_remote_power_button",
"title": {
"en": "Press power button"
},
"args": [
{
"type": "device",
"name": "device",
"filter": "driver_id=infrared_remote&capabilities=power_button"
}
]
},
{
"id": "infrared_remote_on_button",
"title": {
"en": "Press on button"
},
"args": [
{
"type": "device",
"name": "device",
"filter": "driver_id=infrared_remote&capabilities=on_button"
}
]
},
{
"id": "infrared_remote_off_button",
"title": {
"en": "Press off button"
},
"args": [
{
"type": "device",
"name": "device",
"filter": "driver_id=infrared_remote&capabilities=off_button"
}
]
},
{
"id": "light_switch_pir",
"title": {
Expand Down Expand Up @@ -4557,6 +4632,73 @@
}
]
},
{
"capabilities": [
"on_button",
"off_button",
"mute_button"
],
"connectivity": [
"cloud"
],
"platforms": [
"local",
"cloud"
],
"images": {
"small": "/drivers/infrared_remote/assets/images/small.png",
"large": "/drivers/infrared_remote/assets/images/large.png",
"xlarge": "/drivers/infrared_remote/assets/images/xlarge.png"
},
"pair": [
{
"id": "welcome",
"navigation": {
"next": "login_oauth2"
}
},
{
"id": "login_oauth2",
"template": "login_oauth2"
},
{
"id": "list_devices",
"template": "list_devices",
"navigation": {
"next": "add_devices"
}
},
{
"id": "add_devices",
"template": "add_devices"
}
],
"repair": [
{
"id": "login_oauth2",
"template": "login_oauth2"
}
],
"class": "remote",
"name": {
"en": "Infrared Remote",
"nl": "Infrarood Afstandsbediening"
},
"id": "infrared_remote",
"settings": [
{
"id": "deviceSpecification",
"type": "label",
"label": {
"en": "Device Specification"
},
"hint": {
"en": "The Tuya specification of this device"
},
"value": "<not available>"
}
]
},
{
"capabilities": [
"measure_water",
Expand Down Expand Up @@ -6955,6 +7097,16 @@
}
]
},
"mute_button": {
"type": "boolean",
"title": {
"en": "Mute"
},
"getable": false,
"setable": true,
"uiComponent": "button",
"icon": "assets/capabilities/button_mute.svg"
},
"night_mode": {
"title": {
"en": "Night Mode"
Expand All @@ -6965,6 +7117,26 @@
"setable": true,
"icon": "assets/capabilities/sleep_mode.svg"
},
"off_button": {
"type": "boolean",
"title": {
"en": "Off"
},
"getable": false,
"setable": true,
"uiComponent": "button",
"icon": "assets/capabilities/button_off.svg"
},
"on_button": {
"type": "boolean",
"title": {
"en": "On"
},
"getable": false,
"setable": true,
"uiComponent": "button",
"icon": "assets/capabilities/button_on.svg"
},
"open_window_sensor": {
"type": "boolean",
"title": {
Expand All @@ -6982,6 +7154,16 @@
},
"icon": "assets/capabilities/open_window.svg"
},
"power_button": {
"type": "boolean",
"title": {
"en": "Power"
},
"getable": false,
"setable": true,
"uiComponent": "button",
"icon": "assets/capabilities/button_power.svg"
},
"ptz_control_horizontal": {
"type": "enum",
"title": {
Expand Down
1 change: 1 addition & 0 deletions assets/capabilities/button_mute.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/capabilities/button_off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/capabilities/button_on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/capabilities/button_power.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion drivers/dimmer/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
TuyaDeviceSpecificationResponse,
} from '../../types/TuyaApiTypes';
import type { StandardDeviceFlowArgs, StandardFlowArgs } from '../../types/TuyaTypes';
import TuyaOAuth2DeviceDimmer from './device';
import type TuyaOAuth2DeviceDimmer from './device';
import { SIMPLE_DIMMER_CAPABILITIES } from './TuyaDimmerConstants';
import TRANSLATIONS from './translations.json';

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions drivers/infrared_remote/assets/device_classes/camera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5096987

Please sign in to comment.