home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.01k stars 2.74k forks source link

Add Utility Meter: Supported Tariffs need to contain a value #12938

Closed RubenKelevra closed 11 months ago

RubenKelevra commented 2 years ago

Checklist

Describe the issue you are experiencing

Adding a Utility Meter as a helper requires the user to enter a supported tariff. The help text below the input field on the other hand states, that it should be left black if only a single tariff is needed:

Screenshot_20220612_192421-1

Describe the behavior you expected

The input field should be optional.

Steps to reproduce the issue

  1. Go to helper page
  2. Click on add
  3. Select Utility Meter
  4. Fill in all required fields and leave Supported Tariffs empty
  5. Be reminded that Supported Tariffs need to contain a value

What version of Home Assistant Core has the issue?

2022.6.4

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Firefox 101.0.1 / Chromium Version 102.0.5005.61 (Official Build, ungoogled-chromium)

Which operating system are you using to run this browser?

Arch Linux x86_64

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jdelker commented 2 years ago

This issue is still present in Home Assistant 2022.9.3

jdelker commented 2 years ago

Correction: With 2022.9.3 the UI form does accept an empty "Supported Tariffs" field. However, the field is still marked as required (). In my case, it was the field "Meter reset cycle", which was causing the error. It is not marked as required (no ), but must be filled with a selection (e.g. "No cycle").

karwosts commented 1 year ago

The tariffs field is marked as required because it is defined as required in the core integration:

https://github.com/home-assistant/core/blob/dev/homeassistant/components/utility_meter/config_flow.py#L93

I do see meter reset cycle currently visually marked as required:

image

If you want that tariffs field to not be visually marked as required, you need an issue/PR in home-assistant/core repository to remove the required property on that field in the config flow, there's nothing can be done in the frontend.

Otherwise I don't think there's anything more that can be done here and would suggest this to be closed.

github-actions[bot] commented 11 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.