Refactor: "merged" StateValue and DeviceStateValue.