register = self.get_register_by_name(point_name)
if register.read_only:
raise IOError("Trying to write to a point configured read only: {}".format(point_name))
if register.register_type == "status":
raise RuntimeError("Status register does not support set_point")
try:
if register.register_type == "setting" or register.register_type == "hold":
register.set_state(value)
elif register.register_type in ["vacation", "programs"]:
After Change
:param value: Intended update value
:return: Updated state from remote API
refresh = kwargs.get("Refresh")
// Find the correct register by name, set its state, then fetch the new state based on the register"s type
register = self.get_register_by_name(point_name)
if register.read_only:
raise IOError("Trying to write to a point configured read only: {}".format(point_name))