Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vertical and horizontal vane position controls #109

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

nathanjw
Copy link

@nathanjw nathanjw commented Aug 3, 2023

Starting from #103 by @seime, extract the vane implementation code and format according to existing style. Leave behind all the reformatting.

Copy link

@SSMCD SSMCD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed working with my MSZ-FH09NA unit. Thank you!

Recommend disabling the swing mode trait of the climate component if these Horizontal and Vertical selects are used.
See Advanced Configuration:

supports:
  swing_mode: []

README.md Outdated
horizontal_vane_select:
name: Horizontal Vane Position
vertical_vane_select:
name: Horizontal Vane Position
Copy link

@SSMCD SSMCD Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    horizontal_vane_select:
      name: ${name} Horizontal Vane
    vertical_vane_select:
      name: ${name} Vertical Vane

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added MSZ-FH35V as a verified working unit. Also tested fine with MSZ-LN35VG2W

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This likely went away when I set the base branch to develop. Can you work with @nathanjw on that rebase?

@swannet
Copy link

swannet commented Sep 4, 2023

I've tested this PR on my units (MSZ-AP**VGK, currently tested on MSZ-AP25GK and MSZ-AP55VGK, but the board is the same) and they are working as expected. I've used the by SSMCD on 4th august (line 231 > Horizontal Vane Position > ${name} Vertical Vane)

@geoffdavis
Copy link
Owner

Can you rebase this onto devel instead of master? I've got some pending commits on the devel branch that I need to package as a release. They're mostly documentation changes.

@geoffdavis geoffdavis changed the base branch from master to develop September 4, 2023 16:47
Starting from geoffdavis#103 by @seime,
extract the vane implementation code and format according to existing style.
Leave behind all the reformatting.
@nathanjw
Copy link
Author

nathanjw commented Sep 5, 2023

Rebased against devel, and caught up to the changes there. I also re-added the models that @seime mentioned.

@geoffdavis geoffdavis changed the title Modified patch for vane support. Add vertical and horizontal vane position controls Oct 13, 2023
Copy link
Owner

@geoffdavis geoffdavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most units don't support Horizontal or Both swing modes by default. Please leave the default set to ['OFF', 'VERTICAL']

README.md Outdated Show resolved Hide resolved
@SGXander
Copy link

Tested nathanjw:unformat-select and it's working well on MSZ-LN25VG2

@Ferrox85
Copy link

Can this be merged? I Want to get rid of the MELCLOUD integration, but I need this kind of control to be able to do that..

@geoffdavis
Copy link
Owner

Can this be merged? I Want to get rid of the MELCLOUD integration, but I need this kind of control to be able to do that..

Not until the change I requested is made, and the conflicts are resolved.

@geoffdavis geoffdavis added the enhancement New feature or request label Dec 30, 2023
@SGXander
Copy link

SGXander commented Dec 30, 2023

I've made a slight alteration at https://github.com/SGXander/esphome-mitsubishiheatpump/tree/split_fix which I'd be happy to PR either here or into nathanjws fork, let me know which. The underlying swicago library specifies "<>" which in nathanjws version is marked as "auto" but during testing I have discovered it is actually "split" (leaving the middle clear and sending air left and right). I've updated this in my fork under the split_fix branch but so far I haven't found the command code to activate auto on the horizontal_vane so have left it out of the options variable.
Edit: I'm giving up for the night but auto is not 0x00 like vertical (of course not) but it must be another value not listed as the select returns to default(left) when unset. I'll carry on looking tomorrow.

@nathanjw
Copy link
Author

Please take another look. I had adjusted the defaults as requested, but missed that merge conflict. I think that is resolved now.

@eclair4151
Copy link

Whats the best way to test this PR on my Home Assistant install? I tried replacing the external component URL with your branch URL, but it didnt seem to have any effect.

@SGXander
Copy link

SGXander commented Jan 2, 2024

Whats the best way to test this PR on my Home Assistant install? I tried replacing the external component URL with your branch URL, but it didnt seem to have any effect.

external_components:
  - source: github://nathanjw/esphome-mitsubishiheatpump@unformat-select

@eclair4151
Copy link

Awesome, thanks! Just tested it out, working for me as well. I wish Home assistant let you customize the HVAC card to allow you to put the swing in the card, oh well :). @SGXander I think you still need to mark the PR ready for review.

@SGXander
Copy link

SGXander commented Jan 5, 2024

Awesome, thanks! Just tested it out, working for me as well. I wish Home assistant let you customize the HVAC card to allow you to put the swing in the card, oh well :). @SGXander I think you still need to mark the PR ready for review.

Not my repo, it's ready to merge already though if you want it to report "split" instead of "auto" then use my fork for now as I don't think nathanjw has updated this one.

@eclair4151
Copy link

Ah whoops, @nathanjw thoughts on adding in support for horizontal vane split position in this PR and marking it ready for review?

@SGXander
Copy link

SGXander commented Jan 7, 2024

put in nathanjw#1 for the split thing that way it should update this PR if approved

@eclair4151
Copy link

@nathanjw Whats the status on this? If we dont hear back should we just raise a separate PR based on yours SGXander which includes the fix?

@nathanjw
Copy link
Author

I think I'd like to get this in as is and then a cosmetic renaming of that horizontal mode could be a much easier followon.

@jamiebegin
Copy link

Whats the best way to test this PR on my Home Assistant install? I tried replacing the external component URL with your branch URL, but it didnt seem to have any effect.

external_components:
  - source: github://nathanjw/esphome-mitsubishiheatpump@unformat-select

I'm getting a whole slew of errors when I attempt to compile using this branch. It starts with:

In file included from src/esphome.h:33,
                 from src/esphome/components/mitsubishi_heatpump/espmhp.h:20,
                 from src/esphome/components/mitsubishi_heatpump/espmhp.cpp:21:
src/esphome/components/mitsubishi_heatpump/espmhp.h:182:14: error: 'optional' in namespace 'std' does not name a template type
         std::optional<std::chrono::duration<long long, std::ratio<60>>> remote_operating_timeout_;

These errors don't happen when using the base branch. I'm not much of a C++ guy so I'm not sure where to start looking for the problem?

@swannet
Copy link

swannet commented Jan 30, 2024

@jamiebegin

You have to add some options to help the compiler use C++17

See the sample below. You've to add the platformio_options with the build_unflag and build_flags

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  # Set platform options to use c++ 17 instead of 11
  platformio_options:
    build_unflags:
      - "-std=gnu++11"
    build_flags:
      - "-std=gnu++17"

@davidcd13
Copy link

Vane selection cannot be integrated into the default home assistant climate card? Is it necessarily a separate card? With Melcloud, vane position is integrated into the default climate card.

@swannet
Copy link

swannet commented Mar 16, 2024

Vane selection cannot be integrated into the default home assistant climate card? Is it necessarily a separate card? With Melcloud, vane position is integrated into the default climate card.

It is possible, with the "features" you can add to the climate card. And with the service-call-tile-feature add-on from Nerwyn (https://github.com/Nerwyn/service-call-tile-feature):

Screenshot 2024-03-16 at 17 30 11
type: thermostat
entity: climate.airco_
features:
  - style: icons
    hvac_modes:
      - 'off'
      - cool
      - heat
      - fan_only
      - dry
    type: climate-hvac-modes
  - style: dropdown
    fan_modes:
      - auto
      - low
      - medium
      - high
    type: climate-fan-modes
  - type: custom:service-call
    entries:
      - type: selector
        entity_id: select.airco_horizontal_vane_position
        options:
          - option: left
            icon: mdi:chevron-double-left
          - option: left_center
            icon: mdi:chevron-left
          - option: center
            icon: mdi:format-horizontal-align-center
          - option: right_center
            icon: mdi:chevron-right
          - option: right
            icon: mdi:chevron-double-left
  - type: custom:service-call
    entries:
      - type: selector
        entity_id: select.airco_vertical_vane_position
        options:
          - option: up
            icon: mdi:chevron-double-up
          - option: up_center
            icon: mdi:chevron-up
          - option: center
            icon: mdi:format-vertical-align-center
          - option: down_center
            icon: mdi:chevron-down
          - option: down
            icon: mdi:chevron-double-down
show_current_as_primary: false

You can change the icons or options as you like.

PapaMater added a commit to PapaMater/esphome-mitsubishiheatpump that referenced this pull request May 5, 2024
complete adding changes to climate.py from pull request geoffdavis#109
PapaMater added a commit to PapaMater/esphome-mitsubishiheatpump that referenced this pull request May 5, 2024
PapaMater added a commit to PapaMater/esphome-mitsubishiheatpump that referenced this pull request May 5, 2024
PapaMater added a commit to PapaMater/esphome-mitsubishiheatpump that referenced this pull request May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants