<commit_before>export const selectNewSensor = ({ newSensor }) => {
  const { macAddress = '' } = newSensor || {};
  return macAddress;
};<commit_msg>Add selectors to select the threshold values for config temperatures<commit_after>export const selectNewSensor = ({ newSensor }) => {
  const { macAddress = '' } = newSensor || {};
  return macAddress;
};

export const selectHotConsecutiveTemperatureThreshold = ({ newSensor }) => {
  const { COLD_CONSECUTIVE: coldConfig } = newSensor;
  const { temperature: coldConfigTemp } = coldConfig;

  const hotConfigTempThreshold = coldConfigTemp + 0.1;

  return hotConfigTempThreshold;
};

export const selectHotCumulativeTemperatureThreshold = ({ newSensor }) => {
  const { COLD_CUMULATIVE: coldConfig } = newSensor;
  const { temperature: coldConfigTemp } = coldConfig;

  const hotConfigTempThreshold = coldConfigTemp + 0.1;

  return hotConfigTempThreshold;
};

export const selectColdConsecutiveTemperatureThreshold = ({ newSensor }) => {
  const { HOT_CONSECUTIVE: hotConfig } = newSensor;
  const { temperature: hotConfigTemp } = hotConfig;

  const coldConfigTempThreshold = hotConfigTemp - 0.1;

  return coldConfigTempThreshold;
};

export const selectColdCumulativeTemperatureThreshold = ({ newSensor }) => {
  const { HOT_CUMULATIVE: hotConfig } = newSensor;
  const { temperature: hotConfigTemp } = hotConfig;

  const coldConfigTempThreshold = hotConfigTemp - 0.1;

  return coldConfigTempThreshold;
};

export const selectConfigTemperatureThresholds = state => {
  const coldCumulativeConfigTempThreshold = selectColdCumulativeTemperatureThreshold(state);
  const hotCumulativeConfigTempThreshold = selectHotCumulativeTemperatureThreshold(state);

  const coldConsecutiveConfigTempThreshold = selectColdConsecutiveTemperatureThreshold(state);
  const hotConsecutiveConfigTempThreshold = selectHotConsecutiveTemperatureThreshold(state);

  return {
    COLD_CUMULATIVE: coldCumulativeConfigTempThreshold,
    HOT_CUMULATIVE: hotCumulativeConfigTempThreshold,
    COLD_CONSECUTIVE: coldConsecutiveConfigTempThreshold,

    HOT_CONSECUTIVE: hotConsecutiveConfigTempThreshold,
  };
};
{'fraction_non_alphanumeric': 0.08551401869158878, 'fraction_numerical': 0.003738317757009346, 'mean_word_length': 6.019672131147541, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1652982', 'n_tokens_mistral': 614, 'n_tokens_neox': 607, 'n_words': 124}