Master bedroom climate flow entity constants
This commit is contained in:
@ -25,6 +25,12 @@ const coolingActive = states['input_boolean.master_bedroom_cooling_on'].state
|
|||||||
const echoDotDND = 'switch.basement_echo_dot_do_not_disturb_switch'
|
const echoDotDND = 'switch.basement_echo_dot_do_not_disturb_switch'
|
||||||
node.log("Master Bedroom Climate: Constants Set")
|
node.log("Master Bedroom Climate: Constants Set")
|
||||||
|
|
||||||
|
// Define some entity IDs
|
||||||
|
|
||||||
|
const masterBedroomAircon = "climate.master_bedroom_aircon"
|
||||||
|
const masterBedroomFan = "fan.master_bedroom_fan"
|
||||||
|
const peopleIDs = ["input_boolean.tony_awake", "input_boolean.tina_awake"]
|
||||||
|
|
||||||
// Helper function to convert a string to title case
|
// Helper function to convert a string to title case
|
||||||
|
|
||||||
function convertToTitleCase(str) {
|
function convertToTitleCase(str) {
|
||||||
@ -194,7 +200,7 @@ let sendFan = {
|
|||||||
"payload": {
|
"payload": {
|
||||||
"action": `fan.${setFan}`,
|
"action": `fan.${setFan}`,
|
||||||
"target": {
|
"target": {
|
||||||
"entity_id": ["fan.master_bedroom_fan"]
|
"entity_id": masterBedroomFan
|
||||||
},
|
},
|
||||||
"data": {}
|
"data": {}
|
||||||
}
|
}
|
||||||
@ -224,7 +230,7 @@ let sendPeople = {
|
|||||||
"payload": {
|
"payload": {
|
||||||
"action": `input_boolean.${setPeople}`,
|
"action": `input_boolean.${setPeople}`,
|
||||||
"target": {
|
"target": {
|
||||||
"entity_id": ["input_boolean.tony_awake","input_boolean.tina_awake"]
|
"entity_id": peopleIDs
|
||||||
},
|
},
|
||||||
"data": {}
|
"data": {}
|
||||||
}
|
}
|
||||||
@ -258,7 +264,7 @@ let sendHvac = {
|
|||||||
"payload": {
|
"payload": {
|
||||||
"action": "climate.set_hvac_mode",
|
"action": "climate.set_hvac_mode",
|
||||||
"target": {
|
"target": {
|
||||||
"entity_id": ["climate.master_bedroom_aircon"]
|
"entity_id": masterBedroomAircon
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"hvac_mode": setHvac
|
"hvac_mode": setHvac
|
||||||
@ -270,7 +276,7 @@ let sendTemp = {
|
|||||||
"payload": {
|
"payload": {
|
||||||
"action": "climate.set_temperature",
|
"action": "climate.set_temperature",
|
||||||
"target": {
|
"target": {
|
||||||
"entity_id": ["climate.master_bedroom_aircon"]
|
"entity_id": masterBedroomAircon
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"temperature": setTemp
|
"temperature": setTemp
|
||||||
@ -282,7 +288,7 @@ let sendEco = {
|
|||||||
"payload": {
|
"payload": {
|
||||||
"action": "climate.set_preset_mode",
|
"action": "climate.set_preset_mode",
|
||||||
"target": {
|
"target": {
|
||||||
"entity_id": ["climate.master_bedroom_aircon"]
|
"entity_id": masterBedroomAircon
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"preset_mode": setEco
|
"preset_mode": setEco
|
||||||
@ -294,7 +300,7 @@ let sendAcFan = {
|
|||||||
"payload": {
|
"payload": {
|
||||||
"action": "climate.set_fan_mode",
|
"action": "climate.set_fan_mode",
|
||||||
"target": {
|
"target": {
|
||||||
"entity_id": ["climate.master_bedroom_aircon"]
|
"entity_id": masterBedroomAircon
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"fan_mode": "auto"
|
"fan_mode": "auto"
|
||||||
|
Reference in New Issue
Block a user