Giter Site home page Giter Site logo

sicknesz / midea-humidifier-card Goto Github PK

View Code? Open in Web Editor NEW
26.0 5.0 4.0 727 KB

Dehumidifier companion card to https://github.com/nbogojevic/midea-beautiful-dehumidifier

License: MIT License

JavaScript 5.19% TypeScript 94.53% Shell 0.28%
midea home-assistant dehumidifier lovelace-custom-card

midea-humidifier-card's Introduction

Midea Humidifier Card

hacs_badge maintenance-shield

A companion card to the Midea Humidifier Lan integration that added tons of options comparing to previous integrations, so much that the classic humidifier card was kinda lacking alot, so i made this card specifically for that (Midea/Inventor EVA Pro (De)Humifidier Appliances)

Changelogs

v1.0.7 - Latest current version - Fixed fan mode name change in homeassistant-midea-air-appliances-lan v0.6.0

v1.0.6 - Updated readme.md

v1.0.5 - Changed the ion icon color to match all others (current mode color)

v1.0.3 - Added missing ion_entity from card editor and autoconfig

v1.0.2 - Added card editor, single file output and handling of all warning (defrost, tank_full, filter)

v1.0.1 - Added power buttons, all fan preset modes and ion toggle

Installation

Install

HACS Install

  1. Go to the section frontend.
  2. Click on the 3 dots in the top right corner.
  3. Select "Custom repositories"
  4. Add the URL to the repository.
  5. Select the correct category (lovelace)
  6. Click the "ADD" button.
  7. Install

Manual install

  1. Download and copy midea-humidifier-card.js from the my repo into your config/www directory.

  2. Add the resource reference as decribed below.

CLI install

  1. Move into your config/www directory.

  2. Grab midea-humidifier-card.js:

wget https://raw.githubusercontent.com/sicknesz/midea-inventor-card/master/dist/midea-humidifier-card.js
  1. Add the resource reference as decribed below.

Add resource reference

If you configure Lovelace via YAML, add a reference to midea-humidifier-card.js inside your configuration.yaml:

resources:
  - url: /hacsfiles/midea-humidifier-card.js?v=1.0.7
    type: module

Else, if you prefer the graphical editor, use the menu to add the resource:

  1. Make sure, advanced mode is enabled in your user profile (click on your user name to get there)
  2. Navigate to Configuration -> Lovelace Dashboards -> Resources Tab. Hit orange (+) icon
  3. Enter URL /hacsfiles/midea-humidifier-card.js and select type "JavaScript Module".
  4. Restart Home Assistant.

Usage

Click to add an element to your lovelace view, select the midea-humidifier-card, it will open the visual card editor but everything should be autoconfigured properly unless you have more than one humidifier, in that case just manually click and set all fields in the editor.

Troubleshooting

PS : If you do not see the filter and defrost entities, it's because they're disabled by default on the integration, to enable them navigate to /config/integrations choose the midea humidifier lan integration, click on "11 entities", search for defrost and enable the defrost and filter entities (if they're not visible look at the entity filter and disable it) then you'll be able to add them to the card.

type: 'custom:midea-humidifier-card'
entity: humidifier.dehumidifier_<deviceID>
humidity_entity: sensor.dehumidifier_<deviceID>_humidity
temperature_entity: sensor.dehumidifier_<deviceID>_temperature
fan_entity: fan.dehumidifier_<deviceID>_fan
filter_entity: binary_sensor.dehumidifier_<deviceID>_replace_filter
defrost_entity: binary_sensor.dehumidifier_<deviceID>_defrosting
tank_entity: binary_sensor.dehumidifier_<deviceID>_tank_full
ion_entity: switch.dehumidifier_<deviceID>_ion_mode
show_ion_toggle: true
swap_target_and_current_humidity: true

Options

Name Type Requirement Description Default
type string Required custom:midea-humidifier-card
name string Optional Card name Midea Humidifier
entity string Required Humidifier entity ID. humidifier.<id>
fan_entity string Required Humidifiers fan entity ID. fan.<id>
humidity_entity string Required Humidifiers humidity sensor entity ID. sensor.<id>
temperature_entity string Required Humidifiers temperature sensor entity ID. sensor.<id>
tank_entity string Optional Humidifiers tank binary sensor entity binary_sensor.<id>
filter_entity string Optional Humidifiers filter binary sensor entity binary_sensor.<id>
defrost_entity string Optional Humidifiers defrost binary sensor entity binary_sensor.<id>
ion_entity string Optional Humidifiers ion switch entity switch.<id>
show_ion_toggle boolean Optional Display the ion switch toggle icon. true
swap_target_and_current_humidity boolean Optional Swap current and target humidity display true

Screenshots

Screenshot #1 Screenshot #2 Screenshot #3 Screenshot #4 Screenshot #5 Screenshot #6 Screenshot #7 Screenshot #8 Screenshot #9 Screenshot #10 Screenshot #11 Screenshot #12

Support

Hey dude! Help me out for a couple of 🍻 or a ☕ !

Salut Mec! Tu peu me soutenir en m'offrant quelques 🍻 ou un ☕ !

coffee

midea-humidifier-card's People

Contributors

is343 avatar sicknesz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

midea-humidifier-card's Issues

Not loading Card

Checklist:

  • [ x] I updated to the latest version available
  • [ x] I cleared the cache of my browser

Release with the issue:
v1.0.7
Last working release (if known):
NA
Browser and Operating System:
Chrome Version 103.0.5060.134 (Official Build) (64-bit)
Windows 10
Home Assistant Version
Home Assistant 2022.8.1
Supervisor 2022.07.0
Operating System 8.4
Frontend 20220802.0 - latest

Description of problem:
Installed via HACS: Integration version: 1.26.2 ; Frontend version: 20220714083628
Shows up as an option and auto-configures itself to my Midea dehumidifier. No display. It acts like it is not loading the midea-humidifier-card.js javascript. I tried manually installing the resource by downloading manually and loading it in /config/www. Still not loading after multiple reboots and refreshes (F5) and wiping browser cache. Also checked in Home Assistant App for Android.

Javascript errors shown in the web inspector (if applicable):

 midea-humidifier-card  1.0.7
midea-humidifier-card.js:1  midea-humidifier-card  1.0.7
midea:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "midea-humidifier-card" has already been used with this registry
alarmo-card.js?hacstag=391372854141:880   ALARMO-CARD    Version: v1.4.1 
mini-graph-card-bundle.js?hacstag=1512800620110:1  MINI-GRAPH-CARD  0.11.0 
mini-climate-card-bundle.js?hacstag=268163975221:1  MINI-CLIMATE-CARD  v2.2.1 
browser_mod.js:145 BROWSER_MOD 1.5.3 IS INSTALLED    DeviceID: 9d45784e-96dd0c29
2midea-humidifier-card.js?hacstag=443842068108:125 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'state')
    at Ft.render (midea-humidifier-card.js?hacstag=443842068108:125:51)
    at Ft.update (midea-humidifier-card.js?hacstag=443842068108:1:18065)
    at Ft.performUpdate (midea-humidifier-card.js?hacstag=443842068108:1:9399)
    at Ft.scheduleUpdate (midea-humidifier-card.js?hacstag=443842068108:1:9046)
    at Ft._$EC (midea-humidifier-card.js?hacstag=443842068108:1:8954)

Additional information:

Problem in making it work

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Release with the issue:

  • midea-humidifier-card.js
  • midea-humidifier-card-7dfbb60b.js
  • midea-humidifier-card-editor-8fd902ee.js

Last working release (if known):

Browser and Operating System:

  • Microsoft Edge Ver. 96.0.1054.62
  • Home Assistant 2021.12.5

Description of problem:
Hi,
first of all thank you for your fantastic card!
I just tried to install it for my new Inventor dehumidifier configured in hass throuh @nbogojevic homeassistant-midea-dehumidifier-lan.

Initially, I encountered some problem during the installation and I fix them as specified below
Step 1
Replaced source URLs with:

Step 2
I linked the resources through the new panel in:

  • Configuration / Dashboards / Resources

Step 3
Replaced "_XYZ" with ""

Finally I added the card in my hass but nothing happens, no card appears nor error in the log.
Have you any idea?
Thank you!

Fan speed control broken with integration v0.6.0

First, thank you for the great work!

v0.6.0 of the homeassistant-midea-air-appliances-lan integration has introduced a breaking change on fan speed control:

Removed speed control for fan (preset control is still there).

As a result, fan speed control is broken:
Capture d’écran 2022-01-29 à 00 18 31

Thanks!

Ion switch

Hey thank you for your work and the result of the card.

I just install it and i notice than when your turn on the ION the button just change a lil to bit in Grey.

Here in ON
image

And here Off
image

Additional entities

Hi,

thanks for this great card. It really makes the integration seamless to homeassistant.
But i also have a feature request to improve the card a bit.

Is your feature request related to a problem? Please describe.
I have my dehumidifier "enhanced" with some external devices like a zigbee hygrometer on top and an smart plug to fully power it off if desired. Also i have a switch to enable/disable the internet access for my dehumidifer and currently i need to add this switches and sensors manually to an additional card and group them.

Maybe your card can also carry some addional entities?

Describe the solution you'd like
Maybe a solution could be to add them to the 'entities' key and list all not to a icon or feature mapable entities below the feature selector in the card as a simple list?

What do you think? Does this make sense for you?

Thanks
eloo

Always shows Celsius

Checklist:

  • [ x ] I updated to the latest version available
  • [ x ] I cleared the cache of my browser

Release with the issue:
Latest

Last working release (if known):
None

Browser and Operating System:
It doesn't matter

Description of problem:

The Celsius unit of measurement is hard coded in the javascript. I can see it on line 77 of midea-humidifier-card.js, but don't know how to setup an if/else statement to pull from HA config. It would be nice if this could display in freedom units.

https://github.com/sicknesz/midea-humidifier-card/blob/master/dist/midea-humidifier-card.js

Javascript errors shown in the web inspector (if applicable):

Additional information:

Thank you for the consideration if you've read this far.

New feature: persist selected fan speed for each mode

It will be good to persist the selected fan speed for each mode (for the modes for which it can be selected, i.e. target, smart, continuous).

Current behaviour:

  1. Select Continuous mode and fan speed "low"
  2. Select Dryer mode. The fan speed is set to "high" (forced fan speed for "Dryer" mode)
  3. Select Continuous mode back, the fan speed remains on "high"

Expected behaviour:

  1. Select Continuous mode back, the fan speed is restored to the previous selected speed for that mode ("low" in this example)

Thanks!

Horizontal Card

A good idea would be to have an option to make this card horizontal so that it would take less space in height.

Something like the attached. Unless there is a way I do not know about. :)

MideaCardTest

Great Work though very nice card.

Colors

This is not a bug but how can we change the colors or icons and slider ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.