Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
4.4 KiB

  1. //--------------------------------------------------------------------------------
  2. // General PROGMEM definitions
  3. //--------------------------------------------------------------------------------
  4. PROGMEM const char custom_reset_hardware[] = "Hardware button";
  5. PROGMEM const char custom_reset_web[] = "Reboot from web interface";
  6. PROGMEM const char custom_reset_terminal[] = "Reboot from terminal";
  7. PROGMEM const char custom_reset_mqtt[] = "Reboot from MQTT";
  8. PROGMEM const char custom_reset_rpc[] = "Reboot from RPC";
  9. PROGMEM const char custom_reset_ota[] = "Reboot after successful OTA update";
  10. PROGMEM const char custom_reset_http[] = "Reboot from HTTP";
  11. PROGMEM const char custom_reset_nofuss[] = "Reboot after successful NoFUSS update";
  12. PROGMEM const char custom_reset_upgrade[] = "Reboot after successful web update";
  13. PROGMEM const char custom_reset_factory[] = "Factory reset";
  14. PROGMEM const char* const custom_reset_string[] = {
  15. custom_reset_hardware, custom_reset_web, custom_reset_terminal,
  16. custom_reset_mqtt, custom_reset_rpc, custom_reset_ota,
  17. custom_reset_http, custom_reset_nofuss, custom_reset_upgrade,
  18. custom_reset_factory
  19. };
  20. #if SENSOR_SUPPORT
  21. PROGMEM const unsigned char magnitude_decimals[] = {
  22. 0,
  23. 1, 0, 2,
  24. 3, 0, 0, 0, 0, 0, 0, 0,
  25. 0, 0, 0,
  26. 0, 0, 0,
  27. 0, 0
  28. };
  29. PROGMEM const char magnitude_unknown_topic[] = "unknown";
  30. PROGMEM const char magnitude_temperature_topic[] = "temperature";
  31. PROGMEM const char magnitude_humidity_topic[] = "humidity";
  32. PROGMEM const char magnitude_pressure_topic[] = "pressure";
  33. PROGMEM const char magnitude_current_topic[] = "current";
  34. PROGMEM const char magnitude_voltage_topic[] = "voltage";
  35. PROGMEM const char magnitude_active_power_topic[] = "power";
  36. PROGMEM const char magnitude_apparent_power_topic[] = "apparent";
  37. PROGMEM const char magnitude_reactive_power_topic[] = "reactive";
  38. PROGMEM const char magnitude_power_factor_topic[] = "factor";
  39. PROGMEM const char magnitude_energy_topic[] = "energy";
  40. PROGMEM const char magnitude_energy_delta_topic[] = "energy_delta";
  41. PROGMEM const char magnitude_analog_topic[] = "analog";
  42. PROGMEM const char magnitude_digital_topic[] = "digital";
  43. PROGMEM const char magnitude_events_topic[] = "events";
  44. PROGMEM const char magnitude_pm1dot0_topic[] = "pm1dot0";
  45. PROGMEM const char magnitude_pm2dot5_topic[] = "pm2dot5";
  46. PROGMEM const char magnitude_pm10_topic[] = "pm10";
  47. PROGMEM const char magnitude_co2_topic[] = "co2";
  48. PROGMEM const char magnitude_lux_topic[] = "lux";
  49. PROGMEM const char magnitude_uv_topic[] = "uv";
  50. PROGMEM const char magnitude_distance_topic[] = "distance";
  51. PROGMEM const char* const magnitude_topics[] = {
  52. magnitude_unknown_topic, magnitude_temperature_topic, magnitude_humidity_topic,
  53. magnitude_pressure_topic, magnitude_current_topic, magnitude_voltage_topic,
  54. magnitude_active_power_topic, magnitude_apparent_power_topic, magnitude_reactive_power_topic,
  55. magnitude_power_factor_topic, magnitude_energy_topic, magnitude_energy_delta_topic,
  56. magnitude_analog_topic, magnitude_digital_topic, magnitude_events_topic,
  57. magnitude_pm1dot0_topic, magnitude_pm2dot5_topic, magnitude_pm10_topic,
  58. magnitude_co2_topic, magnitude_lux_topic, magnitude_uv_topic,
  59. magnitude_distance_topic
  60. };
  61. PROGMEM const char magnitude_empty[] = "";
  62. PROGMEM const char magnitude_celsius[] = "C";
  63. PROGMEM const char magnitude_fahrenheit[] = "F";
  64. PROGMEM const char magnitude_percentage[] = "%";
  65. PROGMEM const char magnitude_hectopascals[] = "hPa";
  66. PROGMEM const char magnitude_amperes[] = "A";
  67. PROGMEM const char magnitude_volts[] = "V";
  68. PROGMEM const char magnitude_watts[] = "W";
  69. PROGMEM const char magnitude_kw[] = "kW";
  70. PROGMEM const char magnitude_joules[] = "J";
  71. PROGMEM const char magnitude_kwh[] = "kWh";
  72. PROGMEM const char magnitude_ugm3[] = "µg/m3";
  73. PROGMEM const char magnitude_ppm[] = "ppm";
  74. PROGMEM const char magnitude_lux[] = "lux";
  75. PROGMEM const char magnitude_uv[] = "uv";
  76. PROGMEM const char magnitude_distance[] = "m";
  77. PROGMEM const char* const magnitude_units[] = {
  78. magnitude_empty, magnitude_celsius, magnitude_percentage,
  79. magnitude_hectopascals, magnitude_amperes, magnitude_volts,
  80. magnitude_watts, magnitude_watts, magnitude_watts,
  81. magnitude_percentage, magnitude_joules, magnitude_joules,
  82. magnitude_empty, magnitude_empty, magnitude_empty,
  83. magnitude_ugm3, magnitude_ugm3, magnitude_ugm3,
  84. magnitude_ppm, magnitude_lux, magnitude_uv,
  85. magnitude_distance
  86. };
  87. #endif