private void PublishThermostatState(clsThermostat thermostat) { PublishAsync(thermostat.ToTopic(Topic.current_operation), thermostat.ToOperationState()); PublishAsync(thermostat.ToTopic(Topic.current_temperature), thermostat.TempText()); PublishAsync(thermostat.ToTopic(Topic.current_humidity), thermostat.HumidityText()); PublishAsync(thermostat.ToTopic(Topic.temperature_heat_state), thermostat.HeatSetpointText()); PublishAsync(thermostat.ToTopic(Topic.temperature_cool_state), thermostat.CoolSetpointText()); PublishAsync(thermostat.ToTopic(Topic.humidify_state), thermostat.HumidifySetpointText()); PublishAsync(thermostat.ToTopic(Topic.dehumidify_state), thermostat.DehumidifySetpointText()); PublishAsync(thermostat.ToTopic(Topic.mode_state), thermostat.ToModeState()); PublishAsync(thermostat.ToTopic(Topic.mode_basic_state), thermostat.ToModeBasicState()); PublishAsync(thermostat.ToTopic(Topic.fan_mode_state), thermostat.FanModeText().ToLower()); PublishAsync(thermostat.ToTopic(Topic.hold_state), thermostat.HoldStatusText().ToLower()); }