minor lifeline changes
This commit is contained in:
1 parent
de66de832e
commit
80b8ea92c2
3 files changed
+19
-11
No files matched your search
@@ -98,7 +98,8 @@ var ENTITIES = {
|
|||||||
expire_after: 5,
|
expire_after: 5,
|
||||||
name: "Flichub Connected",
|
name: "Flichub Connected",
|
||||||
device_class: "connectivity",
|
device_class: "connectivity",
|
||||||
unit_of_measurement: "s"
|
unit_of_measurement: "s",
|
||||||
|
payload_not_available: "OFF"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
connected: [
|
connected: [
|
||||||
@@ -107,7 +108,8 @@ var ENTITIES = {
|
|||||||
entity_category: "diagnostic",
|
entity_category: "diagnostic",
|
||||||
expire_after: 5,
|
expire_after: 5,
|
||||||
device_class: "connectivity",
|
device_class: "connectivity",
|
||||||
name: "Connection Established"
|
name: "Connection Established",
|
||||||
|
payload_not_available: "OFF"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
ready: [
|
ready: [
|
||||||
@@ -165,12 +167,12 @@ function makeButtonController(ha, buttonModule) {
|
|||||||
availability: [
|
availability: [
|
||||||
{
|
{
|
||||||
payload_available: "ON",
|
payload_available: "ON",
|
||||||
payload_not_available: "OFF",
|
payload_not_available: "unavailable",
|
||||||
topic: ha.genFlicPrefix(genButtonUniqueId(button.bdaddr), "ready")
|
topic: ha.genFlicPrefix(genButtonUniqueId(button.bdaddr), "ready")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
payload_available: "ON",
|
payload_available: "ON",
|
||||||
payload_not_available: "OFF",
|
payload_not_available: "unavailable",
|
||||||
topic: ha.genFlicPrefix(genButtonUniqueId(button.bdaddr), "lifeline")
|
topic: ha.genFlicPrefix(genButtonUniqueId(button.bdaddr), "lifeline")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -452,7 +454,7 @@ var makeIRController = function(ir, ha, mqtt) {
|
|||||||
var availability = [
|
var availability = [
|
||||||
{
|
{
|
||||||
payload_available: "ON",
|
payload_available: "ON",
|
||||||
payload_not_available: "OFF",
|
payload_not_available: "unavailable",
|
||||||
topic: LIFELINE_SGINAL
|
topic: LIFELINE_SGINAL
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -470,7 +472,10 @@ var makeIRController = function(ir, ha, mqtt) {
|
|||||||
ha.registerEntity("IR Available", "binary_sensor", nodeId, "lifeline", haDevice, {
|
ha.registerEntity("IR Available", "binary_sensor", nodeId, "lifeline", haDevice, {
|
||||||
device_class: "connectivity",
|
device_class: "connectivity",
|
||||||
expire_after: 5,
|
expire_after: 5,
|
||||||
entity_category: "diagnostic"
|
off_delay: 3,
|
||||||
|
entity_category: "diagnostic",
|
||||||
|
payload_available: "ON",
|
||||||
|
payload_not_available: "OFF"
|
||||||
});
|
});
|
||||||
ha.registerEntity("Record Signal", "switch", nodeId, "record", haDevice, {
|
ha.registerEntity("Record Signal", "switch", nodeId, "record", haDevice, {
|
||||||
icon: "mdi:record-rec",
|
icon: "mdi:record-rec",
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ const ENTITIES: Record<string, [HAComponent, Record<string, any>]> = {
|
|||||||
"state": ['sensor', { icon: 'mdi:radiobox-indeterminate-variant' }],
|
"state": ['sensor', { icon: 'mdi:radiobox-indeterminate-variant' }],
|
||||||
"battery": ['sensor', { expire_after: 5, unit_of_measurement: '%', device_class: 'battery' }],
|
"battery": ['sensor', { expire_after: 5, unit_of_measurement: '%', device_class: 'battery' }],
|
||||||
"batteryLastUpdate": ['sensor', { entity_category: "diagnostic", expire_after: 5, name: "Battery Last Update Time", device_class: "duration", unit_of_measurement: "s" }],
|
"batteryLastUpdate": ['sensor', { entity_category: "diagnostic", expire_after: 5, name: "Battery Last Update Time", device_class: "duration", unit_of_measurement: "s" }],
|
||||||
"lifeline": ['binary_sensor', { entity_category: "diagnostic", expire_after: 5, name: "Flichub Connected", device_class: "connectivity", unit_of_measurement: "s" }],
|
"lifeline": ['binary_sensor', { entity_category: "diagnostic", expire_after: 5, name: "Flichub Connected", device_class: "connectivity", unit_of_measurement: "s", payload_not_available: "OFF" }],
|
||||||
"connected": ['binary_sensor', { entity_category: "diagnostic", expire_after: 5, device_class: 'connectivity', name: "Connection Established" }],
|
"connected": ['binary_sensor', { entity_category: "diagnostic", expire_after: 5, device_class: 'connectivity', name: "Connection Established", payload_not_available: "OFF" }],
|
||||||
"ready": ['binary_sensor', { entity_category: "config", expire_after: 5, device_class: 'connectivity', name: "Connection Verified" }],
|
"ready": ['binary_sensor', { entity_category: "config", expire_after: 5, device_class: 'connectivity', name: "Connection Verified" }],
|
||||||
"activeDisconnect": ['binary_sensor', { entity_category: "config", expire_after: 5, name: "User Active Disconnect" }],
|
"activeDisconnect": ['binary_sensor', { entity_category: "config", expire_after: 5, name: "User Active Disconnect" }],
|
||||||
"passive": ['binary_sensor', { entity_category: "config", expire_after: 5, name: "Passive Mode" }],
|
"passive": ['binary_sensor', { entity_category: "config", expire_after: 5, name: "Passive Mode" }],
|
||||||
@@ -52,12 +52,12 @@ export function makeButtonController(
|
|||||||
availability: [
|
availability: [
|
||||||
{
|
{
|
||||||
payload_available: 'ON',
|
payload_available: 'ON',
|
||||||
payload_not_available: 'OFF',
|
payload_not_available: 'unavailable',
|
||||||
topic: ha.genFlicPrefix(genButtonUniqueId(button.bdaddr), 'ready')
|
topic: ha.genFlicPrefix(genButtonUniqueId(button.bdaddr), 'ready')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
payload_available: 'ON',
|
payload_available: 'ON',
|
||||||
payload_not_available: 'OFF',
|
payload_not_available: 'unavailable',
|
||||||
topic: ha.genFlicPrefix(genButtonUniqueId(button.bdaddr), 'lifeline')
|
topic: ha.genFlicPrefix(genButtonUniqueId(button.bdaddr), 'lifeline')
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
+4
-1
@@ -47,7 +47,7 @@ export const makeIRController = (
|
|||||||
const availability = [
|
const availability = [
|
||||||
{
|
{
|
||||||
"payload_available": "ON",
|
"payload_available": "ON",
|
||||||
"payload_not_available": "OFF",
|
"payload_not_available": "unavailable",
|
||||||
"topic": LIFELINE_SGINAL,
|
"topic": LIFELINE_SGINAL,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -73,7 +73,10 @@ export const makeIRController = (
|
|||||||
{
|
{
|
||||||
device_class: 'connectivity',
|
device_class: 'connectivity',
|
||||||
expire_after: 5,
|
expire_after: 5,
|
||||||
|
off_delay: 3,
|
||||||
entity_category: "diagnostic",
|
entity_category: "diagnostic",
|
||||||
|
payload_available: "ON",
|
||||||
|
payload_not_available: "OFF",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
ha.registerEntity(
|
ha.registerEntity(
|
||||||
|
|||||||
Reference in new issue
Block a user