Skip to content

A card to display the Heat Index and Discomfort Index (aka Thom Index)

License

Notifications You must be signed in to change notification settings

argaar/comfortable-environment-card

Repository files navigation

Comfortable Environment Card

A card to display the Heat Index and Discomfort Index (aka Thom Index)

The Heat Index (HI) combines temperature and humidity to give an equivalent temperature a body can perceive. The Discomfort Index (DI), is a value representing the sensation of comfort (or discomfort) you'll experiencing.

While the HI is useful if you're planning some activities that requires hard work (and probably leads to sweat), the DI tells you in realtime if the amount of humidity and the temperature is ok for your comfortable enviroment, since even if the temperature seems to be ok, you could feel hot, too hot, cold, etc. depending on the humidity.

GitHub Release License hacs_badge

Project Maintenance GitHub Activity

Options

Name Type Requirement Description Default
type string Required custom:comfortable-environment-card
room_name string Optional Room name at top of the card ""
temperature_sensor string Required Any "sensor" entity reporting temperature
humidity_sensor string Required Any "sensor" entity reporting humidity
display_precision number Optional Numbers of decimals to show 1
show_index string Optional Choose index to show (ALL, HI, DI) ALL
show_realvalues string Optional Choose value to show (ALL, TEMPERATURE, HUMIDITY, NONE) ALL
index_showinfo string Optional Display Index Info (ALL, ICON, ICON_AND_N.., ICON_AND_T..) ALL

Screenshot

card_screenshot

Known Issues

Can't get my language working

This card get the language code from a variable in your browser, issued by HomeAssistant when you choose the default one in your profile page. Sometimes this variable is not present, so if you can't display this card in your preferred language, please try to switch to a different language and then back to your preferred one (so for example if you want to show the card in Czech, switch to English, and then back to Czech) This way, HomeAssistant should populate the variable with the lang code and the card will fine the correct text instead of fallback to English

Group Sensors

The card editor has a filter to let user choose temperature and humidity sensors only, all other entities from HA are excluded from the selection Unfortunately if you have a sensor based on Min/Max Helper (aka "Combine the state of..."), you won't find it in the dropdown because it lacks the correct device_class attribute (see here and here)

Don't worry! There are (at least) three workarounds:

  • Use a Group Helper instead, the result will be the same (you can group temp/hum sensors and calc the mean/median value as in Min/Max)

  • While you're in card editing mode, press on "SHOW CODE EDITOR" and write the

    • temperature_sensor: sensor.my_temp_sensor

    or

    • humidity_sensor: sensor.my_hum_sensor

    value by hand, you should see the card renders as soon as you write the sensor name

  • Go in the HA Developer Tools from the sidebar, then choose "States" and search for your Min/Max sensor click on it and in the "State attribute" area, add the property

    • device_class: temperature

    or

    • device_class: humidity

    then press Set State, this attribute is valid only until the next restart but you need it just once in order to configure the card

Languages

Thanks to the people listed below and many more, this card is available in the following languages:

  • Brazilian - pt-BR_lang_status - Originally translated by @igorsantos07
  • Czech - cs_lang_status - Originally translated by @ElektronikCZ
  • Dutch - nl_lang_status - Originally translated by @GHeiner
  • German - de_lang_status - Originally translated by @Andurilll
  • English (default) - en_lang_status - Originally translated by @argaar
  • French - fr_lang_status - Originally translated by @GaPhi
  • Greek - gr_lang_status - Originally translated by @tzam
  • Hungarian - hu_lang_status - Originally translated by @n0is3r
  • Italian - it_lang_status - Originally translated by @argaar
  • Polish - pl_lang_status - Originally translated by @mailwash
  • Portuguese - pt_lang_status - Originally translated by @FragMenthor
  • Russian - ru_lang_status - Originally translated by @kai-zer-ru
  • Slovak - sk_lang_status - Originally translated by @misa1515
  • Spanish - es_lang_status - Originally translated by @ale87jan
  • Ukrainian - uk_lang_status - Originally translated by @rkoptev

Credits

Calcs are based on research and (mostly) from National Weather Service (https://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml) The temperature bar idea was inspired by @madmicio 's ph-meter-temperature card (https://github.com/madmicio/ph-meter-temperature) Also this project is sponsored by Locize that hosts the localization service locize

Want to HELP?

Pull request, issues or translations are very welcomed. If you can contribute writing code feel free to submit your PR, if you find a bug or have an idea about an enhanchment that everyone could benefit of please write it in the issues If you can help translating some text, head to invitation link on Locize