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'
|
||||
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
|
||||
|
||||
function convertToTitleCase(str) {
|
||||
@ -194,7 +200,7 @@ let sendFan = {
|
||||
"payload": {
|
||||
"action": `fan.${setFan}`,
|
||||
"target": {
|
||||
"entity_id": ["fan.master_bedroom_fan"]
|
||||
"entity_id": masterBedroomFan
|
||||
},
|
||||
"data": {}
|
||||
}
|
||||
@ -224,7 +230,7 @@ let sendPeople = {
|
||||
"payload": {
|
||||
"action": `input_boolean.${setPeople}`,
|
||||
"target": {
|
||||
"entity_id": ["input_boolean.tony_awake","input_boolean.tina_awake"]
|
||||
"entity_id": peopleIDs
|
||||
},
|
||||
"data": {}
|
||||
}
|
||||
@ -258,7 +264,7 @@ let sendHvac = {
|
||||
"payload": {
|
||||
"action": "climate.set_hvac_mode",
|
||||
"target": {
|
||||
"entity_id": ["climate.master_bedroom_aircon"]
|
||||
"entity_id": masterBedroomAircon
|
||||
},
|
||||
"data": {
|
||||
"hvac_mode": setHvac
|
||||
@ -270,7 +276,7 @@ let sendTemp = {
|
||||
"payload": {
|
||||
"action": "climate.set_temperature",
|
||||
"target": {
|
||||
"entity_id": ["climate.master_bedroom_aircon"]
|
||||
"entity_id": masterBedroomAircon
|
||||
},
|
||||
"data": {
|
||||
"temperature": setTemp
|
||||
@ -282,7 +288,7 @@ let sendEco = {
|
||||
"payload": {
|
||||
"action": "climate.set_preset_mode",
|
||||
"target": {
|
||||
"entity_id": ["climate.master_bedroom_aircon"]
|
||||
"entity_id": masterBedroomAircon
|
||||
},
|
||||
"data": {
|
||||
"preset_mode": setEco
|
||||
@ -294,7 +300,7 @@ let sendAcFan = {
|
||||
"payload": {
|
||||
"action": "climate.set_fan_mode",
|
||||
"target": {
|
||||
"entity_id": ["climate.master_bedroom_aircon"]
|
||||
"entity_id": masterBedroomAircon
|
||||
},
|
||||
"data": {
|
||||
"fan_mode": "auto"
|
||||
|
Reference in New Issue
Block a user