Standardize some entity constants naming
This commit is contained in:
@ -22,8 +22,8 @@ node.log("Emma Bedroom Climate: Constants Set")
|
||||
|
||||
// Define reusable constants
|
||||
|
||||
const emmaBedroomAircon = ["climate.emma_bedroom_aircon"]
|
||||
const emmaBedroomWhiteNoise = ["input_boolean.white_noise_emma_bedroom"]
|
||||
const airconEntity = ["climate.emma_bedroom_aircon"]
|
||||
const whiteNoiseEntity = ["input_boolean.white_noise_emma_bedroom"]
|
||||
const validSchedModesAC = ['AC', 'Fan']
|
||||
|
||||
// Helper function to convert a string to title case
|
||||
@ -209,7 +209,7 @@ let sendWhiteNoise = {
|
||||
"payload": {
|
||||
"action": `input_boolean.${setWhiteNoise}`,
|
||||
"target": {
|
||||
"entity_id": emmaBedroomWhiteNoise
|
||||
"entity_id": whiteNoiseEntity
|
||||
},
|
||||
"data": {}
|
||||
}
|
||||
@ -225,7 +225,7 @@ let sendHvac = {
|
||||
"payload": {
|
||||
"action": "climate.set_hvac_mode",
|
||||
"target": {
|
||||
"entity_id": emmaBedroomAircon
|
||||
"entity_id": airconEntity
|
||||
},
|
||||
"data": {
|
||||
"hvac_mode": setHvac
|
||||
@ -237,7 +237,7 @@ let sendTemp = {
|
||||
"payload": {
|
||||
"action": "climate.set_temperature",
|
||||
"target": {
|
||||
"entity_id": emmaBedroomAircon
|
||||
"entity_id": airconEntity
|
||||
},
|
||||
"data": {
|
||||
"temperature": setTemp
|
||||
@ -259,7 +259,7 @@ let sendAcFan = {
|
||||
"payload": {
|
||||
"action": "climate.set_fan_mode",
|
||||
"target": {
|
||||
"entity_id": emmaBedroomAircon
|
||||
"entity_id": airconEntity
|
||||
},
|
||||
"data": {
|
||||
"fan_mode": "auto"
|
||||
|
Reference in New Issue
Block a user