This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- alias: Call webostv.button on HomeKit Remote key presses | |
trigger: | |
- platform: event | |
event_type: homekit_tv_remote_key_pressed | |
event_data: | |
entity_id: media_player.living_room_tv | |
action: | |
- service: webostv.button | |
data_template: | |
entity_id: "{{ trigger.event.data['entity_id'] }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Reference from https://medium.com/@Astider/how-to-สร้าง-messenger-chatbot-แบบ-serverless-ด้วย-google-firebase-908c3eaba67e | |
const functions = require('firebase-functions'); | |
// The Firebase Admin SDK to access the Firebase Realtime Database. | |
const admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
// Create and Deploy Your First Cloud Functions | |
// https://firebase.google.com/docs/functions/write-firebase-functions |