Reuse the Frigate integration devcontainer
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
default_config:
|
||||||
|
|
||||||
|
logger:
|
||||||
|
default: error
|
||||||
|
logs:
|
||||||
|
custom_components.frigate: debug
|
||||||
|
homeassistant.components.mqtt: error
|
||||||
|
|
||||||
|
downloader:
|
||||||
|
download_dir: www
|
||||||
|
|
||||||
|
homeassistant:
|
||||||
|
name: Home
|
||||||
|
latitude: 0
|
||||||
|
longitude: 0
|
||||||
|
elevation: 0
|
||||||
|
unit_system: metric
|
||||||
|
currency: USD
|
||||||
|
time_zone: 'America/Los_Angeles'
|
||||||
|
|
||||||
|
demo:
|
||||||
|
|
||||||
|
lovelace:
|
||||||
|
mode: yaml
|
||||||
|
resources:
|
||||||
|
- url: http://localhost:5001/frigate-hass-card.js
|
||||||
|
type: module
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
views:
|
||||||
|
- cards:
|
||||||
|
- type: custom:frigate-card
|
||||||
|
name: Frigate Card with Frigate Camera
|
||||||
|
cameras:
|
||||||
|
- camera_entity: camera.demo
|
||||||
|
live_provider: frigate-jsmpeg
|
||||||
|
id: camera_demo_jsmpeg
|
||||||
|
- camera_entity: camera.demo
|
||||||
|
live_provider: ha
|
||||||
|
id: camera_demo_ha
|
||||||
|
- type: custom:frigate-card
|
||||||
|
name: Frigate Card with non-Frigate Camera
|
||||||
|
cameras:
|
||||||
|
- camera_entity: camera.demo_camera
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
default_config:
|
|
||||||
lovelace:
|
|
||||||
mode: yaml
|
|
||||||
resources:
|
|
||||||
- url: http://127.0.0.1:5000/frigate-hass-card.js
|
|
||||||
type: module
|
|
||||||
demo:
|
|
||||||
@@ -1,17 +1,16 @@
|
|||||||
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
|
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
|
||||||
{
|
{
|
||||||
"image": "ghcr.io/ludeeus/devcontainer/generic:latest",
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
"forwardPorts": [5000, 8123],
|
"service": "dev",
|
||||||
|
"workspaceFolder": "/workspace",
|
||||||
|
"shutdownAction": "stopCompose",
|
||||||
"portsAttributes": {
|
"portsAttributes": {
|
||||||
"5000": {
|
"5001": {
|
||||||
"label": "Rollup",
|
"label": "Rollup",
|
||||||
"onAutoForward": "silent"
|
"onAutoForward": "silent"
|
||||||
},
|
|
||||||
"8123": {
|
|
||||||
"label": "Home Assistant",
|
|
||||||
"onAutoForward": "notify"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"initializeCommand": "git submodule update --init",
|
||||||
"postCreateCommand": "yarn install",
|
"postCreateCommand": "yarn install",
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"github.vscode-pull-request-github",
|
"github.vscode-pull-request-github",
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
dev:
|
||||||
|
user: node
|
||||||
|
image: mcr.microsoft.com/vscode/devcontainers/javascript-node:0-16
|
||||||
|
ports:
|
||||||
|
# Rollup
|
||||||
|
- 5001:5001
|
||||||
|
volumes:
|
||||||
|
- ..:/workspace:cached
|
||||||
|
command: [sleep, infinity]
|
||||||
|
hass:
|
||||||
|
extends:
|
||||||
|
file: ./frigate-hass-integration/docker-compose.yml
|
||||||
|
service: hass
|
||||||
|
volumes:
|
||||||
|
- ./config/ui-lovelace.yaml:/config/ui-lovelace.yaml:ro
|
||||||
|
- ./config/configuration.yaml:/config/configuration.yaml:ro
|
||||||
|
frigate:
|
||||||
|
extends:
|
||||||
|
file: ./frigate-hass-integration/docker-compose.yml
|
||||||
|
service: frigate
|
||||||
|
mqtt:
|
||||||
|
extends:
|
||||||
|
file: ./frigate-hass-integration/docker-compose.yml
|
||||||
|
service: mqtt
|
||||||
Submodule
+1
Submodule .devcontainer/frigate-hass-integration added at 051381644b
@@ -1,6 +0,0 @@
|
|||||||
views:
|
|
||||||
- cards:
|
|
||||||
- type: custom:frigate-card
|
|
||||||
name: Frigate Card Development
|
|
||||||
cameras:
|
|
||||||
- camera_entity: camera.demo_camera
|
|
||||||
+4
-1
@@ -1,4 +1,7 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
/.rpt2_cache/
|
/.rpt2_cache/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
/dist
|
/dist
|
||||||
|
|
||||||
|
.env
|
||||||
|
.envrc
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[submodule "frigate-hass-integration"]
|
||||||
|
path = .devcontainer/frigate-hass-integration
|
||||||
|
url = https://github.com/blakeblackshear/frigate-hass-integration
|
||||||
|
branch = master
|
||||||
Vendored
+2
-1
@@ -7,7 +7,8 @@
|
|||||||
"name": "Launch Chrome against Home Assistant",
|
"name": "Launch Chrome against Home Assistant",
|
||||||
"url": "http://localhost:8123",
|
"url": "http://localhost:8123",
|
||||||
"webRoot": "${workspaceFolder}/dist",
|
"webRoot": "${workspaceFolder}/dist",
|
||||||
"preLaunchTask": "Rollup & Home Assistant"
|
"preLaunchTask": "Rollup",
|
||||||
|
"resolveSourceMapLocations": ["http://localhost:5001/**"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
-26
@@ -21,32 +21,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"isBackground": true
|
"isBackground": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Home Assistant",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "container start",
|
|
||||||
"problemMatcher": {
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": ".",
|
|
||||||
"file": 1,
|
|
||||||
"location": 2,
|
|
||||||
"message": 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"background": {
|
|
||||||
"activeOnStart": true,
|
|
||||||
"beginsPattern": ".",
|
|
||||||
"endsPattern": "."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"isBackground": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Rollup & Home Assistant",
|
|
||||||
"dependsOn": ["Rollup", "Home Assistant"],
|
|
||||||
"problemMatcher": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ const dev = watch || process.env.DEV === 'true' || process.env.DEV === '1';
|
|||||||
const serveopts = {
|
const serveopts = {
|
||||||
contentBase: ['./dist'],
|
contentBase: ['./dist'],
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 5000,
|
port: 5001,
|
||||||
allowCrossOrigin: true,
|
allowCrossOrigin: true,
|
||||||
headers: {
|
headers: {
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
|
|||||||
+7
-7
@@ -5,7 +5,7 @@ import {
|
|||||||
LitElement,
|
LitElement,
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
unsafeCSS
|
unsafeCSS,
|
||||||
} from 'lit';
|
} from 'lit';
|
||||||
import { customElement, property, state } from 'lit/decorators.js';
|
import { customElement, property, state } from 'lit/decorators.js';
|
||||||
import { classMap } from 'lit/directives/class-map.js';
|
import { classMap } from 'lit/directives/class-map.js';
|
||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
ConditionState,
|
ConditionState,
|
||||||
conditionStateRequestHandler,
|
conditionStateRequestHandler,
|
||||||
getOverriddenConfig,
|
getOverriddenConfig,
|
||||||
getOverridesByKey
|
getOverridesByKey,
|
||||||
} from './card-condition.js';
|
} from './card-condition.js';
|
||||||
import './components/elements.js';
|
import './components/elements.js';
|
||||||
import { FrigateCardElements } from './components/elements.js';
|
import { FrigateCardElements } from './components/elements.js';
|
||||||
@@ -41,7 +41,7 @@ import {
|
|||||||
CAMERA_BIRDSEYE,
|
CAMERA_BIRDSEYE,
|
||||||
CARD_VERSION,
|
CARD_VERSION,
|
||||||
MEDIA_PLAYER_SUPPORT_BROWSE_MEDIA,
|
MEDIA_PLAYER_SUPPORT_BROWSE_MEDIA,
|
||||||
REPO_URL
|
REPO_URL,
|
||||||
} from './const.js';
|
} from './const.js';
|
||||||
import './editor.js';
|
import './editor.js';
|
||||||
import { getLanguage, localize } from './localize/localize.js';
|
import { getLanguage, localize } from './localize/localize.js';
|
||||||
@@ -66,14 +66,14 @@ import {
|
|||||||
MEDIA_TYPE_VIDEO,
|
MEDIA_TYPE_VIDEO,
|
||||||
MenuButton,
|
MenuButton,
|
||||||
Message,
|
Message,
|
||||||
RawFrigateCardConfig
|
RawFrigateCardConfig,
|
||||||
} from './types.js';
|
} from './types.js';
|
||||||
import {
|
import {
|
||||||
convertActionToFrigateCardCustomAction,
|
convertActionToFrigateCardCustomAction,
|
||||||
createFrigateCardCustomAction,
|
createFrigateCardCustomAction,
|
||||||
frigateCardHandleAction,
|
frigateCardHandleAction,
|
||||||
frigateCardHasAction,
|
frigateCardHasAction,
|
||||||
getActionConfigGivenAction
|
getActionConfigGivenAction,
|
||||||
} from './utils/action.js';
|
} from './utils/action.js';
|
||||||
import { contentsChanged } from './utils/basic.js';
|
import { contentsChanged } from './utils/basic.js';
|
||||||
import { getCameraIcon, getCameraID, getCameraTitle } from './utils/camera.js';
|
import { getCameraIcon, getCameraID, getCameraTitle } from './utils/camera.js';
|
||||||
@@ -84,7 +84,7 @@ import {
|
|||||||
homeAssistantSignPath,
|
homeAssistantSignPath,
|
||||||
isHassDifferent,
|
isHassDifferent,
|
||||||
isTriggeredState,
|
isTriggeredState,
|
||||||
sideLoadHomeAssistantElements
|
sideLoadHomeAssistantElements,
|
||||||
} from './utils/ha';
|
} from './utils/ha';
|
||||||
import { getEventID } from './utils/ha/browse-media.js';
|
import { getEventID } from './utils/ha/browse-media.js';
|
||||||
import { DeviceList, getAllDevices } from './utils/ha/device-registry.js';
|
import { DeviceList, getAllDevices } from './utils/ha/device-registry.js';
|
||||||
@@ -92,7 +92,7 @@ import {
|
|||||||
ExtendedEntityCache,
|
ExtendedEntityCache,
|
||||||
getAllEntities,
|
getAllEntities,
|
||||||
getExtendedEntities,
|
getExtendedEntities,
|
||||||
getExtendedEntity
|
getExtendedEntity,
|
||||||
} from './utils/ha/entity-registry.js';
|
} from './utils/ha/entity-registry.js';
|
||||||
import { ResolvedMediaCache } from './utils/ha/resolved-media.js';
|
import { ResolvedMediaCache } from './utils/ha/resolved-media.js';
|
||||||
import { supportsFeature } from './utils/ha/update.js';
|
import { supportsFeature } from './utils/ha/update.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user